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> {
431
431
// while maintaining the invariant that all sysroot crates are unstable
432
432
// by default and are unable to be used.
433
433
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
+ ) ;
437
440
let stability = tcx. intern_stability ( Stability {
438
441
level : attr:: StabilityLevel :: Unstable {
439
- reason : Some ( Symbol :: intern ( reason) ) ,
442
+ reason : Some ( Symbol :: intern ( & reason) ) ,
440
443
issue : 27812 ,
441
444
} ,
442
445
feature : sym:: rustc_private,
You can’t perform that action at this time.
0 commit comments