rename ErrorReported -> ErrorGuaranteed
This commit is contained in:
parent
c42d846add
commit
e489a94dee
112 changed files with 580 additions and 559 deletions
|
@ -2,7 +2,7 @@ use rustc_arena::TypedArena;
|
|||
use rustc_data_structures::fx::{FxHashSet, FxIndexMap};
|
||||
use rustc_data_structures::memmap::Mmap;
|
||||
use rustc_data_structures::temp_dir::MaybeTempDir;
|
||||
use rustc_errors::{ErrorReported, Handler};
|
||||
use rustc_errors::{ErrorGuaranteed, Handler};
|
||||
use rustc_fs_util::fix_windows_verbatim_for_gcc;
|
||||
use rustc_hir::def_id::CrateNum;
|
||||
use rustc_middle::middle::dependency_format::Linkage;
|
||||
|
@ -57,7 +57,7 @@ pub fn link_binary<'a, B: ArchiveBuilder<'a>>(
|
|||
sess: &'a Session,
|
||||
codegen_results: &CodegenResults,
|
||||
outputs: &OutputFilenames,
|
||||
) -> Result<(), ErrorReported> {
|
||||
) -> Result<(), ErrorGuaranteed> {
|
||||
let _timer = sess.timer("link_binary");
|
||||
let output_metadata = sess.opts.output_types.contains_key(&OutputType::Metadata);
|
||||
for &crate_type in sess.crate_types().iter() {
|
||||
|
@ -260,7 +260,7 @@ fn link_rlib<'a, B: ArchiveBuilder<'a>>(
|
|||
flavor: RlibFlavor,
|
||||
out_filename: &Path,
|
||||
tmpdir: &MaybeTempDir,
|
||||
) -> Result<B, ErrorReported> {
|
||||
) -> Result<B, ErrorGuaranteed> {
|
||||
info!("preparing rlib to {:?}", out_filename);
|
||||
|
||||
let lib_search_paths = archive_search_paths(sess);
|
||||
|
@ -407,7 +407,7 @@ fn link_rlib<'a, B: ArchiveBuilder<'a>>(
|
|||
fn collate_raw_dylibs(
|
||||
sess: &Session,
|
||||
used_libraries: &[NativeLib],
|
||||
) -> Result<Vec<(String, Vec<DllImport>)>, ErrorReported> {
|
||||
) -> Result<Vec<(String, Vec<DllImport>)>, ErrorGuaranteed> {
|
||||
// Use index maps to preserve original order of imports and libraries.
|
||||
let mut dylib_table = FxIndexMap::<String, FxIndexMap<Symbol, &DllImport>>::default();
|
||||
|
||||
|
@ -459,7 +459,7 @@ fn link_staticlib<'a, B: ArchiveBuilder<'a>>(
|
|||
codegen_results: &CodegenResults,
|
||||
out_filename: &Path,
|
||||
tempdir: &MaybeTempDir,
|
||||
) -> Result<(), ErrorReported> {
|
||||
) -> Result<(), ErrorGuaranteed> {
|
||||
let mut ab =
|
||||
link_rlib::<B>(sess, codegen_results, RlibFlavor::StaticlibBase, out_filename, tempdir)?;
|
||||
let mut all_native_libs = vec![];
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use crate::traits::*;
|
||||
use rustc_errors::ErrorReported;
|
||||
use rustc_errors::ErrorGuaranteed;
|
||||
use rustc_middle::mir;
|
||||
use rustc_middle::mir::interpret::ErrorHandled;
|
||||
use rustc_middle::ty::layout::{FnAbiOf, HasTyCtxt, TyAndLayout};
|
||||
|
@ -191,7 +191,7 @@ pub fn codegen_mir<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>(
|
|||
all_consts_ok = false;
|
||||
match err {
|
||||
// errored or at least linted
|
||||
ErrorHandled::Reported(ErrorReported) | ErrorHandled::Linted => {}
|
||||
ErrorHandled::Reported(ErrorGuaranteed) | ErrorHandled::Linted => {}
|
||||
ErrorHandled::TooGeneric => {
|
||||
span_bug!(const_.span, "codgen encountered polymorphic constant: {:?}", err)
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ use crate::{CodegenResults, ModuleCodegen};
|
|||
|
||||
use rustc_ast::expand::allocator::AllocatorKind;
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
use rustc_errors::ErrorReported;
|
||||
use rustc_errors::ErrorGuaranteed;
|
||||
use rustc_metadata::EncodedMetadata;
|
||||
use rustc_middle::dep_graph::{WorkProduct, WorkProductId};
|
||||
use rustc_middle::ty::layout::{FnAbiOf, HasTyCtxt, LayoutOf, TyAndLayout};
|
||||
|
@ -98,7 +98,7 @@ pub trait CodegenBackend {
|
|||
ongoing_codegen: Box<dyn Any>,
|
||||
sess: &Session,
|
||||
outputs: &OutputFilenames,
|
||||
) -> Result<(CodegenResults, FxHashMap<WorkProductId, WorkProduct>), ErrorReported>;
|
||||
) -> Result<(CodegenResults, FxHashMap<WorkProductId, WorkProduct>), ErrorGuaranteed>;
|
||||
|
||||
/// This is called on the returned `Box<dyn Any>` from `join_codegen`
|
||||
///
|
||||
|
@ -110,7 +110,7 @@ pub trait CodegenBackend {
|
|||
sess: &Session,
|
||||
codegen_results: CodegenResults,
|
||||
outputs: &OutputFilenames,
|
||||
) -> Result<(), ErrorReported>;
|
||||
) -> Result<(), ErrorGuaranteed>;
|
||||
}
|
||||
|
||||
pub trait ExtraBackendMethods: CodegenBackend + WriteBackendMethods + Sized + Send + Sync {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue