We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent df0936b commit 71cd67fCopy full SHA for 71cd67f
crates/ide_completion/src/completions/unqualified_path.rs
@@ -306,4 +306,25 @@ pub mod prelude {
306
"#]],
307
);
308
}
309
+
310
+ #[test]
311
+ fn local_variable_shadowing() {
312
+ // FIXME: this isn't actually correct, should emit `x` only once.
313
+ check(
314
+ r#"
315
+fn main() {
316
+ let x = 92;
317
+ {
318
319
+ x$0;
320
+ }
321
+}
322
+"#,
323
+ expect![[r#"
324
+ lc x i32
325
326
+ fn main() fn()
327
+ "#]],
328
+ );
329
330
0 commit comments