diff options
author | Edwin Cheng <[email protected]> | 2020-04-27 20:32:47 +0100 |
---|---|---|
committer | Edwin Cheng <[email protected]> | 2020-04-27 20:32:47 +0100 |
commit | 6d3b0af900e6cefb507939b311672b7795703461 (patch) | |
tree | b3845795f3819119e816ec241d27d0fe5f6b2b02 /crates/ra_hir_ty | |
parent | 213d208e2d61576e104a9d5e003efc4ad1abc469 (diff) |
Use empty-deps tricks to detect it is core
Diffstat (limited to 'crates/ra_hir_ty')
-rw-r--r-- | crates/ra_hir_ty/src/tests/macros.rs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/crates/ra_hir_ty/src/tests/macros.rs b/crates/ra_hir_ty/src/tests/macros.rs index ac5485bc9..5ddecbdc6 100644 --- a/crates/ra_hir_ty/src/tests/macros.rs +++ b/crates/ra_hir_ty/src/tests/macros.rs | |||
@@ -646,12 +646,6 @@ mod clone { | |||
646 | fn infer_derive_clone_in_core() { | 646 | fn infer_derive_clone_in_core() { |
647 | let (db, pos) = TestDB::with_position( | 647 | let (db, pos) = TestDB::with_position( |
648 | r#" | 648 | r#" |
649 | //- /main.rs crate:main deps:core | ||
650 | use core::S; | ||
651 | fn test() { | ||
652 | S.clone()<|>; | ||
653 | } | ||
654 | |||
655 | //- /lib.rs crate:core | 649 | //- /lib.rs crate:core |
656 | #[prelude_import] | 650 | #[prelude_import] |
657 | use clone::*; | 651 | use clone::*; |
@@ -663,6 +657,11 @@ mod clone { | |||
663 | #[derive(Clone)] | 657 | #[derive(Clone)] |
664 | pub struct S; | 658 | pub struct S; |
665 | 659 | ||
660 | //- /main.rs crate:main deps:core | ||
661 | use core::S; | ||
662 | fn test() { | ||
663 | S.clone()<|>; | ||
664 | } | ||
666 | "#, | 665 | "#, |
667 | ); | 666 | ); |
668 | assert_eq!("S", type_at_pos(&db, pos)); | 667 | assert_eq!("S", type_at_pos(&db, pos)); |