mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 05:15:04 +00:00
Highlight unsafe trait refs as unsafe only in impl blocks and definitions
This commit is contained in:
parent
7f482afada
commit
29054e02fb
13 changed files with 60 additions and 19 deletions
|
@ -527,6 +527,11 @@ struct Packed {
|
|||
a: u16,
|
||||
}
|
||||
|
||||
unsafe trait UnsafeTrait {}
|
||||
unsafe impl UnsafeTrait for Packed {}
|
||||
|
||||
fn require_unsafe_trait<T: UnsafeTrait>(_: T) {}
|
||||
|
||||
trait DoTheAutoref {
|
||||
fn calls_autoref(&self);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue