diff --git a/compiler/rustc_infer/src/infer/error_reporting/mod.rs b/compiler/rustc_infer/src/infer/error_reporting/mod.rs index d4e8e267bab..dbe068ff174 100644 --- a/compiler/rustc_infer/src/infer/error_reporting/mod.rs +++ b/compiler/rustc_infer/src/infer/error_reporting/mod.rs @@ -1779,11 +1779,8 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> { .tcx .parent_module_from_def_id(defid.expect_local()) .to_def_id(); - let module_name = - self.tcx.def_path(module).to_string_no_crate_verbose(); - format!( - "{name} is defined in module {module_name} of the current crate" - ) + let module_name = self.tcx.def_path(module).to_string_no_crate_verbose(); + format!("{name} is defined in module `crate{module_name}` of the current crate") } else if defid.is_local() { format!("{name} is defined in the current crate") } else { diff --git a/compiler/rustc_infer/src/lib.rs b/compiler/rustc_infer/src/lib.rs index 5b14e5bdb78..909a597e221 100644 --- a/compiler/rustc_infer/src/lib.rs +++ b/compiler/rustc_infer/src/lib.rs @@ -20,7 +20,6 @@ #![cfg_attr(bootstrap, feature(label_break_value))] #![feature(let_chains)] #![cfg_attr(bootstrap, feature(let_else))] -#![feature(let_else)] #![feature(if_let_guard)] #![feature(min_specialization)] #![feature(never_type)] diff --git a/src/test/ui/fully-qualified-type/fully-qualified-type-name2.stderr b/src/test/ui/fully-qualified-type/fully-qualified-type-name2.stderr index 94c34cf9d04..a8f23f81dea 100644 --- a/src/test/ui/fully-qualified-type/fully-qualified-type-name2.stderr +++ b/src/test/ui/fully-qualified-type/fully-qualified-type-name2.stderr @@ -7,12 +7,12 @@ LL | return x; | ^ expected enum `y::Foo`, found enum `x::Foo` | = note: enum `x::Foo` and enum `y::Foo` have similar names, but are actually distinct types -note: enum `x::Foo` is defined in module ::x of the current crate +note: enum `x::Foo` is defined in module `crate::x` of the current crate --> $DIR/fully-qualified-type-name2.rs:4:5 | LL | pub enum Foo { } | ^^^^^^^^^^^^ -note: enum `y::Foo` is defined in module ::y of the current crate +note: enum `y::Foo` is defined in module `crate::y` of the current crate --> $DIR/fully-qualified-type-name2.rs:8:5 | LL | pub enum Foo { } diff --git a/src/test/ui/mismatched_types/show_module.stderr b/src/test/ui/mismatched_types/show_module.stderr index 6d8986d1cad..5e48e0955aa 100644 --- a/src/test/ui/mismatched_types/show_module.stderr +++ b/src/test/ui/mismatched_types/show_module.stderr @@ -7,12 +7,12 @@ LL | meh::Foo | ^^^^^^^^ expected struct `baz::Foo`, found struct `meh::Foo` | = note: struct `meh::Foo` and struct `baz::Foo` have similar names, but are actually distinct types -note: struct `meh::Foo` is defined in module ::meh of the current crate +note: struct `meh::Foo` is defined in module `crate::meh` of the current crate --> $DIR/show_module.rs:8:5 | LL | pub struct Foo; | ^^^^^^^^^^^^^^ -note: struct `baz::Foo` is defined in module ::blah::baz of the current crate +note: struct `baz::Foo` is defined in module `crate::blah::baz` of the current crate --> $DIR/show_module.rs:3:9 | LL | pub struct Foo;