Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir/src/semantics.rs')
| -rw-r--r-- | crates/hir/src/semantics.rs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/crates/hir/src/semantics.rs b/crates/hir/src/semantics.rs index 592e7d3b97..aa10b0f878 100644 --- a/crates/hir/src/semantics.rs +++ b/crates/hir/src/semantics.rs @@ -2,7 +2,7 @@ mod source_to_def; -use std::{cell::RefCell, fmt, iter}; +use std::{cell::RefCell, fmt, iter, ops}; use base_db::{FileId, FileRange}; use hir_def::{ @@ -1449,3 +1449,11 @@ impl<'a> SemanticsScope<'a> { } pub struct VisibleTraits(pub FxHashSet<TraitId>); + +impl ops::Deref for VisibleTraits { + type Target = FxHashSet<TraitId>; + + fn deref(&self) -> &Self::Target { + &self.0 + } +} |