don't trim paths in collector PME message
This commit is contained in:
parent
d854c3c0e9
commit
949aca6eeb
@ -194,6 +194,7 @@ use rustc_middle::mir::mono::{InstantiationMode, MonoItem};
|
||||
use rustc_middle::mir::visit::Visitor as MirVisitor;
|
||||
use rustc_middle::mir::{self, Local, Location};
|
||||
use rustc_middle::ty::adjustment::{CustomCoerceUnsized, PointerCast};
|
||||
use rustc_middle::ty::print::with_no_trimmed_paths;
|
||||
use rustc_middle::ty::subst::{GenericArgKind, InternalSubsts};
|
||||
use rustc_middle::ty::{self, GenericParamDefKind, Instance, Ty, TyCtxt, TypeFoldable};
|
||||
use rustc_middle::{middle::codegen_fn_attrs::CodegenFnAttrFlags, mir::visit::TyContext};
|
||||
@ -444,12 +445,10 @@ fn collect_items_rec<'tcx>(
|
||||
// defined in the local crate.
|
||||
if tcx.sess.diagnostic().err_count() > error_count && starting_point.node.krate() != LOCAL_CRATE
|
||||
{
|
||||
let formatted_item = with_no_trimmed_paths(|| starting_point.node.to_string());
|
||||
tcx.sess.span_note_without_error(
|
||||
starting_point.span,
|
||||
&format!(
|
||||
"the above error was encountered while instantiating `{}`",
|
||||
starting_point.node
|
||||
),
|
||||
&format!("the above error was encountered while instantiating `{}`", formatted_item),
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
error[E0080]: evaluation of constant value failed
|
||||
error[E0080]: evaluation of `post_monomorphization_error::ValidateConstImm::<2_i32, 0_i32, 1_i32>::VALID` failed
|
||||
--> $DIR/auxiliary/post_monomorphization_error.rs:7:17
|
||||
|
|
||||
LL | let _ = 1 / ((IMM >= MIN && IMM <= MAX) as usize);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ attempt to divide `1_usize` by zero
|
||||
|
||||
note: the above error was encountered while instantiating `fn stdarch_intrinsic::<2_i32>`
|
||||
note: the above error was encountered while instantiating `fn post_monomorphization_error::stdarch_intrinsic::<2_i32>`
|
||||
--> $DIR/issue-85155.rs:19:5
|
||||
|
|
||||
LL | post_monomorphization_error::stdarch_intrinsic::<2>();
|
||||
|
Loading…
x
Reference in New Issue
Block a user