aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_ty
diff options
context:
space:
mode:
authorEdwin Cheng <[email protected]>2020-04-27 20:32:47 +0100
committerEdwin Cheng <[email protected]>2020-04-27 20:32:47 +0100
commit6d3b0af900e6cefb507939b311672b7795703461 (patch)
treeb3845795f3819119e816ec241d27d0fe5f6b2b02 /crates/ra_hir_ty
parent213d208e2d61576e104a9d5e003efc4ad1abc469 (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.rs11
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 {
646fn infer_derive_clone_in_core() { 646fn 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
650use core::S;
651fn test() {
652 S.clone()<|>;
653}
654
655//- /lib.rs crate:core 649//- /lib.rs crate:core
656#[prelude_import] 650#[prelude_import]
657use clone::*; 651use clone::*;
@@ -663,6 +657,11 @@ mod clone {
663#[derive(Clone)] 657#[derive(Clone)]
664pub struct S; 658pub struct S;
665 659
660//- /main.rs crate:main deps:core
661use core::S;
662fn 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));