From 4d4dbcfead82eb6af1f4ef781b197a6926788b15 Mon Sep 17 00:00:00 2001 From: Aramis Razzaghipour Date: Sun, 23 May 2021 21:43:23 +1000 Subject: =?UTF-8?q?Give=20=E2=80=98unsafe=E2=80=99=20semantic=20token=20mo?= =?UTF-8?q?difier=20to=20unsafe=20traits?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/hir/src/lib.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'crates/hir') 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 { pub fn is_auto(self, db: &dyn HirDatabase) -> bool { db.trait_data(self.id).is_auto } + + pub fn is_unsafe(&self, db: &dyn HirDatabase) -> bool { + db.trait_data(self.id).is_unsafe + } } impl HasVisibility for Trait { -- cgit v1.2.3