diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-02-09 18:01:04 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2021-02-09 18:01:04 +0000 |
commit | 96a9ab725093b5f6501ed086973906ebb77805ff (patch) | |
tree | a339e6bc8a3873137b6dd16667d3dedf824716ea /crates/hir_def/src/body/tests | |
parent | 98b82859551555a1b0671c75307d56a17aa545b6 (diff) | |
parent | 85906aa304c2265f3ae692d62306ba07694ece45 (diff) |
Merge #7614
7614: Unleash inner item resolution to users r=jonas-schievink a=jonas-schievink
![Peek 2021-02-09 17-30](https://user-images.githubusercontent.com/1786438/107394800-8627f300-6afc-11eb-8662-ed07226bc58f.gif)
Co-authored-by: Jonas Schievink <[email protected]>
Diffstat (limited to 'crates/hir_def/src/body/tests')
-rw-r--r-- | crates/hir_def/src/body/tests/block.rs | 27 |
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] | ||
237 | fn super_does_not_resolve_to_block_module() { | ||
238 | check_at( | ||
239 | r#" | ||
240 | fn 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 | } | ||