mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-14 14:13:58 +00:00
Unsafe traits
This commit is contained in:
parent
a5f2b16366
commit
6833183ab4
1 changed files with 5 additions and 1 deletions
|
@ -33,8 +33,12 @@ impl ShortLabel for ast::EnumDef {
|
|||
|
||||
impl ShortLabel for ast::TraitDef {
|
||||
fn short_label(&self) -> Option<String> {
|
||||
if self.unsafe_token().is_some() {
|
||||
short_label_from_node(self, "unsafe trait ")
|
||||
} else {
|
||||
short_label_from_node(self, "trait ")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl ShortLabel for ast::Module {
|
||||
|
|
Loading…
Reference in a new issue