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};
// 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),
);
}
-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>();