aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_ty/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir_ty/src')
-rw-r--r--crates/ra_hir_ty/src/tests/macros.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/crates/ra_hir_ty/src/tests/macros.rs b/crates/ra_hir_ty/src/tests/macros.rs
index 2e309a379..eb97288f1 100644
--- a/crates/ra_hir_ty/src/tests/macros.rs
+++ b/crates/ra_hir_ty/src/tests/macros.rs
@@ -639,3 +639,22 @@ mod clone {
639 ); 639 );
640 assert_eq!("(Wrapper<S>, {unknown})", type_at_pos(&db, pos)); 640 assert_eq!("(Wrapper<S>, {unknown})", type_at_pos(&db, pos));
641} 641}
642
643#[test]
644fn infer_custom_derive_simple() {
645 // FIXME: this test current now do nothing
646 let (db, pos) = TestDB::with_position(
647 r#"
648//- /main.rs crate:main
649use foo::Foo;
650
651#[derive(Foo)]
652struct S{}
653
654fn test() {
655 S{}<|>;
656}
657"#,
658 );
659 assert_eq!("S", type_at_pos(&db, pos));
660}