From 997bd97b77e0cacf7eb8e466071e416492cc24b3 Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Fri, 5 Feb 2021 19:24:03 +0100 Subject: Fix resolution of `self` module within blocks --- crates/hir_def/src/body/tests/block.rs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'crates/hir_def/src/body/tests') diff --git a/crates/hir_def/src/body/tests/block.rs b/crates/hir_def/src/body/tests/block.rs index 062560a70..e688c0989 100644 --- a/crates/hir_def/src/body/tests/block.rs +++ b/crates/hir_def/src/body/tests/block.rs @@ -26,9 +26,10 @@ fn outer() { fn use_from_crate() { check_at( r#" -struct Struct; +struct Struct {} fn outer() { - use Struct; + fn Struct() {} + use Struct as PlainStruct; use crate::Struct as CrateStruct; use self::Struct as SelfStruct; $0 @@ -36,12 +37,13 @@ fn outer() { "#, expect![[r#" block scope - CrateStruct: t v - SelfStruct: t v - Struct: t v + CrateStruct: t + PlainStruct: t v + SelfStruct: t + Struct: v crate - Struct: t v + Struct: t outer: v "#]], ); -- cgit v1.2.3