aboutsummaryrefslogtreecommitdiff
path: root/crates/ide/src/syntax_highlighting/tests.rs
diff options
context:
space:
mode:
authorLukas Wirth <[email protected]>2021-06-15 20:44:07 +0100
committerLukas Wirth <[email protected]>2021-06-15 20:49:59 +0100
commit29054e02fbc7a858d9d4a6efd61583ac45b3213b (patch)
tree87d55a0ef8df2c6263722ea3899c4e45c11173db /crates/ide/src/syntax_highlighting/tests.rs
parent7f482afada7519e828b8dbe8fafe063885256516 (diff)
Highlight unsafe trait refs as unsafe only in impl blocks and definitions
Diffstat (limited to 'crates/ide/src/syntax_highlighting/tests.rs')
-rw-r--r--crates/ide/src/syntax_highlighting/tests.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/crates/ide/src/syntax_highlighting/tests.rs b/crates/ide/src/syntax_highlighting/tests.rs
index f7d8334a0..4f0b1ce85 100644
--- a/crates/ide/src/syntax_highlighting/tests.rs
+++ b/crates/ide/src/syntax_highlighting/tests.rs
@@ -527,6 +527,11 @@ struct Packed {
527 a: u16, 527 a: u16,
528} 528}
529 529
530unsafe trait UnsafeTrait {}
531unsafe impl UnsafeTrait for Packed {}
532
533fn require_unsafe_trait<T: UnsafeTrait>(_: T) {}
534
530trait DoTheAutoref { 535trait DoTheAutoref {
531 fn calls_autoref(&self); 536 fn calls_autoref(&self);
532} 537}