diff options
Diffstat (limited to 'crates')
-rw-r--r-- | crates/hir_def/src/nameres/path_resolution.rs | 1 | ||||
-rw-r--r-- | crates/hir_def/src/nameres/tests/diagnostics.rs | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/crates/hir_def/src/nameres/path_resolution.rs b/crates/hir_def/src/nameres/path_resolution.rs index bb8ccaa9d..7588e0088 100644 --- a/crates/hir_def/src/nameres/path_resolution.rs +++ b/crates/hir_def/src/nameres/path_resolution.rs | |||
@@ -65,6 +65,7 @@ impl ResolvePathResult { | |||
65 | impl DefMap { | 65 | impl DefMap { |
66 | pub(super) fn resolve_name_in_extern_prelude(&self, name: &Name) -> PerNs { | 66 | pub(super) fn resolve_name_in_extern_prelude(&self, name: &Name) -> PerNs { |
67 | if name == &name!(self) { | 67 | if name == &name!(self) { |
68 | mark::hit!(extern_crate_self_as); | ||
68 | return PerNs::types( | 69 | return PerNs::types( |
69 | ModuleId { krate: self.krate, local_id: self.root }.into(), | 70 | ModuleId { krate: self.krate, local_id: self.root }.into(), |
70 | Visibility::Public, | 71 | Visibility::Public, |
diff --git a/crates/hir_def/src/nameres/tests/diagnostics.rs b/crates/hir_def/src/nameres/tests/diagnostics.rs index 679a505dc..e8e72e5ef 100644 --- a/crates/hir_def/src/nameres/tests/diagnostics.rs +++ b/crates/hir_def/src/nameres/tests/diagnostics.rs | |||
@@ -63,6 +63,7 @@ fn unresolved_extern_crate() { | |||
63 | 63 | ||
64 | #[test] | 64 | #[test] |
65 | fn extern_crate_self_as() { | 65 | fn extern_crate_self_as() { |
66 | mark::check!(extern_crate_self_as); | ||
66 | check_diagnostics( | 67 | check_diagnostics( |
67 | r" | 68 | r" |
68 | //- /lib.rs | 69 | //- /lib.rs |