diff options
author | Aramis Razzaghipour <[email protected]> | 2021-05-23 12:43:23 +0100 |
---|---|---|
committer | Aramis Razzaghipour <[email protected]> | 2021-05-23 12:45:10 +0100 |
commit | 4d4dbcfead82eb6af1f4ef781b197a6926788b15 (patch) | |
tree | 395729f98518d6f4ac5996d3cbfd4b65d04a85f1 /crates/hir | |
parent | 57eedd906688d6cfa332bd40bca5234043e7293e (diff) |
Give ‘unsafe’ semantic token modifier to unsafe traits
Diffstat (limited to 'crates/hir')
-rw-r--r-- | crates/hir/src/lib.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs index 800101c91..a7c42ca1e 100644 --- a/crates/hir/src/lib.rs +++ b/crates/hir/src/lib.rs | |||
@@ -1085,6 +1085,10 @@ impl Trait { | |||
1085 | pub fn is_auto(self, db: &dyn HirDatabase) -> bool { | 1085 | pub fn is_auto(self, db: &dyn HirDatabase) -> bool { |
1086 | db.trait_data(self.id).is_auto | 1086 | db.trait_data(self.id).is_auto |
1087 | } | 1087 | } |
1088 | |||
1089 | pub fn is_unsafe(&self, db: &dyn HirDatabase) -> bool { | ||
1090 | db.trait_data(self.id).is_unsafe | ||
1091 | } | ||
1088 | } | 1092 | } |
1089 | 1093 | ||
1090 | impl HasVisibility for Trait { | 1094 | impl HasVisibility for Trait { |