File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -431,12 +431,15 @@ impl<'tcx> Index<'tcx> {
431431 // while maintaining the invariant that all sysroot crates are unstable
432432 // by default and are unable to be used.
433433 if tcx. sess . opts . debugging_opts . force_unstable_if_unmarked {
434- let reason = "this crate is being loaded from the sysroot, an \
435- unstable location; did you mean to load this crate \
436- from crates.io via `Cargo.toml` instead?";
434+ let reason = format ! (
435+ "crate \" {}\" is being loaded from the sysroot, an \
436+ unstable location; did you mean to load this crate \
437+ from crates.io via `Cargo.toml` instead?",
438+ tcx. crate_name( LOCAL_CRATE )
439+ ) ;
437440 let stability = tcx. intern_stability ( Stability {
438441 level : attr:: StabilityLevel :: Unstable {
439- reason : Some ( Symbol :: intern ( reason) ) ,
442+ reason : Some ( Symbol :: intern ( & reason) ) ,
440443 issue : 27812 ,
441444 } ,
442445 feature : sym:: rustc_private,
You can’t perform that action at this time.
0 commit comments