use rustc_data_structures::fx::{FxHashMap, FxHashSet};
use rustc_data_structures::sync::{par_iter, MTLock, MTRef, ParallelIterator};
-use rustc_errors::{ErrorGuaranteed, FatalError};
use rustc_hir as hir;
use rustc_hir::def_id::{DefId, DefIdMap, LocalDefId, LOCAL_CRATE};
use rustc_hir::itemlikevisit::ItemLikeVisitor;
if let Some(path) = written_to_path {
err.note(&format!("the full type name has been written to '{}'", path.display()));
}
- err.emit();
- FatalError.raise();
+ err.emit()
}
recursion_depths.insert(def_id, recursion_depth + 1);
"consider adding a `#![type_length_limit=\"{}\"]` attribute to your crate",
type_length
));
- diag.emit();
- tcx.sess.abort_if_errors();
+ diag.emit()
}
}
match self.tcx.const_eval_resolve(param_env, ct, None) {
// The `monomorphize` call should have evaluated that constant already.
Ok(val) => val,
- Err(ErrorHandled::Reported(ErrorGuaranteed) | ErrorHandled::Linted) => {
- return;
- }
+ Err(ErrorHandled::Reported(_) | ErrorHandled::Linted) => return,
Err(ErrorHandled::TooGeneric) => span_bug!(
self.body.source_info(location).span,
"collection encountered polymorphic constant: {:?}",
substituted_constant,
val
),
- Err(ErrorHandled::Reported(ErrorGuaranteed) | ErrorHandled::Linted) => {}
+ Err(ErrorHandled::Reported(_) | ErrorHandled::Linted) => {}
Err(ErrorHandled::TooGeneric) => span_bug!(
self.body.source_info(location).span,
"collection encountered polymorphic constant: {}",
|lint| {
let mut err = lint.build(&format!("moving {} bytes", layout.size.bytes()));
err.span_label(source_info.span, "value moved from here");
- err.emit()
+ err.emit();
},
);
}