From 7067a22e1c1ab9041475359922d1863f7d9a4f5c Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Tue, 9 Feb 2021 17:24:43 +0100 Subject: Add another block def map test --- crates/hir_def/src/body/tests/block.rs | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'crates/hir_def/src/body/tests/block.rs') 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() { "#]], ) } + +#[test] +fn super_does_not_resolve_to_block_module() { + check_at( + r#" +fn main() { + struct Struct {} + mod module { + use super::Struct; + + $0 + } +} + "#, + expect![[r#" + block scope + Struct: t + module: t + + block scope::module + Struct: _ + + crate + main: v + "#]], + ); +} -- cgit v1.2.3