aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def/src/body/tests
diff options
context:
space:
mode:
authorJonas Schievink <[email protected]>2021-02-09 16:24:43 +0000
committerJonas Schievink <[email protected]>2021-02-09 16:24:43 +0000
commit7067a22e1c1ab9041475359922d1863f7d9a4f5c (patch)
tree6e8b4733dff0f3b4309d1a3b8f608cb20cad8374 /crates/hir_def/src/body/tests
parentb9c213da7abcb49e59ecdb630653ae61b4d5c8f2 (diff)
Add another block def map test
Diffstat (limited to 'crates/hir_def/src/body/tests')
-rw-r--r--crates/hir_def/src/body/tests/block.rs27
1 files changed, 27 insertions, 0 deletions
diff --git a/crates/hir_def/src/body/tests/block.rs b/crates/hir_def/src/body/tests/block.rs
index b599c6269..a5ec0883f 100644
--- a/crates/hir_def/src/body/tests/block.rs
+++ b/crates/hir_def/src/body/tests/block.rs
@@ -232,3 +232,30 @@ fn f() {
232 "#]], 232 "#]],
233 ) 233 )
234} 234}
235
236#[test]
237fn super_does_not_resolve_to_block_module() {
238 check_at(
239 r#"
240fn main() {
241 struct Struct {}
242 mod module {
243 use super::Struct;
244
245 $0
246 }
247}
248 "#,
249 expect![[r#"
250 block scope
251 Struct: t
252 module: t
253
254 block scope::module
255 Struct: _
256
257 crate
258 main: v
259 "#]],
260 );
261}