aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide
diff options
context:
space:
mode:
authorDiana <[email protected]>2020-05-01 16:49:41 +0100
committerDiana <[email protected]>2020-05-01 16:49:41 +0100
commit6833183ab45d5f0ad2e350d62c457eb8a4734b83 (patch)
tree633595a9636a52840d0511c46b3ada4d329171bd /crates/ra_ide
parenta5f2b16366f027ad60c58266a66eb7fbdcbda9f9 (diff)
Unsafe traits
Diffstat (limited to 'crates/ra_ide')
-rw-r--r--crates/ra_ide/src/display/short_label.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/crates/ra_ide/src/display/short_label.rs b/crates/ra_ide/src/display/short_label.rs
index 4b081bf6c..d37260e96 100644
--- a/crates/ra_ide/src/display/short_label.rs
+++ b/crates/ra_ide/src/display/short_label.rs
@@ -33,7 +33,11 @@ impl ShortLabel for ast::EnumDef {
33 33
34impl ShortLabel for ast::TraitDef { 34impl ShortLabel for ast::TraitDef {
35 fn short_label(&self) -> Option<String> { 35 fn short_label(&self) -> Option<String> {
36 short_label_from_node(self, "trait ") 36 if self.unsafe_token().is_some() {
37 short_label_from_node(self, "unsafe trait ")
38 } else {
39 short_label_from_node(self, "trait ")
40 }
37 } 41 }
38} 42}
39 43