aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiana <[email protected]>2020-05-01 16:49:51 +0100
committerDiana <[email protected]>2020-05-01 16:49:51 +0100
commitebff5762e9789ecd472564284994a9ac119b4166 (patch)
tree4104c6699f980300233028411a99b8f786e01b0c
parent6833183ab45d5f0ad2e350d62c457eb8a4734b83 (diff)
Test for unsafe trait
-rw-r--r--crates/ra_ide/src/hover.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/crates/ra_ide/src/hover.rs b/crates/ra_ide/src/hover.rs
index a62f598f0..54d318858 100644
--- a/crates/ra_ide/src/hover.rs
+++ b/crates/ra_ide/src/hover.rs
@@ -869,4 +869,15 @@ fn func(foo: i32) { if true { <|>foo; }; }
869 &[r#"pub(crate) async unsafe extern "C" fn foo()"#], 869 &[r#"pub(crate) async unsafe extern "C" fn foo()"#],
870 ); 870 );
871 } 871 }
872
873 #[test]
874 fn test_hover_trait_show_qualifiers() {
875 check_hover_result(
876 "
877 //- /lib.rs
878 unsafe trait foo<|>() {}
879 ",
880 &["unsafe trait foo"],
881 );
882 }
872} 883}