diff options
Diffstat (limited to 'crates/ide_completion/src/completions/unqualified_path.rs')
-rw-r--r-- | crates/ide_completion/src/completions/unqualified_path.rs | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/crates/ide_completion/src/completions/unqualified_path.rs b/crates/ide_completion/src/completions/unqualified_path.rs index 20188a7dd..bd955aa85 100644 --- a/crates/ide_completion/src/completions/unqualified_path.rs +++ b/crates/ide_completion/src/completions/unqualified_path.rs | |||
@@ -385,10 +385,11 @@ fn foo() { | |||
385 | fn foo() { let x: $0 } | 385 | fn foo() { let x: $0 } |
386 | 386 | ||
387 | //- /std/lib.rs crate:std | 387 | //- /std/lib.rs crate:std |
388 | #[prelude_import] | 388 | pub mod prelude { |
389 | use prelude::*; | 389 | pub mod rust_2018 { |
390 | 390 | pub struct Option; | |
391 | mod prelude { struct Option; } | 391 | } |
392 | } | ||
392 | "#, | 393 | "#, |
393 | expect![[r#" | 394 | expect![[r#" |
394 | fn foo() fn() | 395 | fn foo() fn() |
@@ -406,12 +407,10 @@ mod prelude { struct Option; } | |||
406 | fn f() {$0} | 407 | fn f() {$0} |
407 | 408 | ||
408 | //- /std/lib.rs crate:std | 409 | //- /std/lib.rs crate:std |
409 | #[prelude_import] | 410 | pub mod prelude { |
410 | pub use prelude::*; | 411 | pub mod rust_2018 { |
411 | 412 | pub use crate::concat; | |
412 | #[macro_use] | 413 | } |
413 | mod prelude { | ||
414 | pub use crate::concat; | ||
415 | } | 414 | } |
416 | 415 | ||
417 | mod macros { | 416 | mod macros { |
@@ -436,16 +435,18 @@ mod macros { | |||
436 | fn foo() { let x: $0 } | 435 | fn foo() { let x: $0 } |
437 | 436 | ||
438 | //- /core/lib.rs crate:core | 437 | //- /core/lib.rs crate:core |
439 | #[prelude_import] | 438 | pub mod prelude { |
440 | use prelude::*; | 439 | pub mod rust_2018 { |
441 | 440 | pub struct Option; | |
442 | mod prelude { struct Option; } | 441 | } |
442 | } | ||
443 | 443 | ||
444 | //- /std/lib.rs crate:std deps:core | 444 | //- /std/lib.rs crate:std deps:core |
445 | #[prelude_import] | 445 | pub mod prelude { |
446 | use prelude::*; | 446 | pub mod rust_2018 { |
447 | 447 | pub struct String; | |
448 | mod prelude { struct String; } | 448 | } |
449 | } | ||
449 | "#, | 450 | "#, |
450 | expect![[r#" | 451 | expect![[r#" |
451 | fn foo() fn() | 452 | fn foo() fn() |