diff options
author | Lukas Wirth <[email protected]> | 2021-06-15 20:44:07 +0100 |
---|---|---|
committer | Lukas Wirth <[email protected]> | 2021-06-15 20:49:59 +0100 |
commit | 29054e02fbc7a858d9d4a6efd61583ac45b3213b (patch) | |
tree | 87d55a0ef8df2c6263722ea3899c4e45c11173db /crates/ide/src/syntax_highlighting/tests.rs | |
parent | 7f482afada7519e828b8dbe8fafe063885256516 (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.rs | 5 |
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 | ||
530 | unsafe trait UnsafeTrait {} | ||
531 | unsafe impl UnsafeTrait for Packed {} | ||
532 | |||
533 | fn require_unsafe_trait<T: UnsafeTrait>(_: T) {} | ||
534 | |||
530 | trait DoTheAutoref { | 535 | trait DoTheAutoref { |
531 | fn calls_autoref(&self); | 536 | fn calls_autoref(&self); |
532 | } | 537 | } |