mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Move ws insert rendering for macro expansion into ide_db
This commit is contained in:
parent
d03397fe11
commit
328419534d
10 changed files with 139 additions and 95 deletions
|
@ -1163,9 +1163,12 @@ impl<'a> SemanticsScope<'a> {
|
|||
Some(Crate { id: self.resolver.krate()? })
|
||||
}
|
||||
|
||||
pub fn in_macro_file(&self) -> bool {
|
||||
self.file_id.is_macro()
|
||||
}
|
||||
|
||||
/// Note: `FxHashSet<TraitId>` should be treated as an opaque type, passed into `Type
|
||||
// FIXME: rename to visible_traits to not repeat scope?
|
||||
pub fn traits_in_scope(&self) -> FxHashSet<TraitId> {
|
||||
pub fn visible_traits(&self) -> FxHashSet<TraitId> {
|
||||
let resolver = &self.resolver;
|
||||
resolver.traits_in_scope(self.db.upcast())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue