diff options
author | kazatsuyu <[email protected]> | 2021-01-22 15:11:37 +0000 |
---|---|---|
committer | kazatsuyu <[email protected]> | 2021-01-22 15:11:37 +0000 |
commit | 90d6740e3237e396f437619d115b8595d2242392 (patch) | |
tree | 0d20ccc85a829096fcda8300d4b2aa4998ccf337 /crates/hir_def/src | |
parent | 0fb4544403f67fd4f9046532cff70f776d5ba562 (diff) |
Add mark::check! and mark::hit!
Diffstat (limited to 'crates/hir_def/src')
-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 |