mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-09 06:16:06 +00:00
Address more comments
This commit is contained in:
parent
a0ad457575
commit
20ff1cdcfb
@ -234,10 +234,9 @@ fn collect_items(
|
|||||||
// FIXME: cfg?
|
// FIXME: cfg?
|
||||||
AssocItem::Const(id) => {
|
AssocItem::Const(id) => {
|
||||||
let item = &item_tree[id];
|
let item = &item_tree[id];
|
||||||
let name = if let Some(name) = item.name.clone() {
|
let name = match item.name.clone() {
|
||||||
name
|
Some(name) => name,
|
||||||
} else {
|
None => continue,
|
||||||
continue;
|
|
||||||
};
|
};
|
||||||
let def = ConstLoc { container, id: ItemTreeId::new(file_id, id) }.intern(db);
|
let def = ConstLoc { container, id: ItemTreeId::new(file_id, id) }.intern(db);
|
||||||
items.push((name, def.into()));
|
items.push((name, def.into()));
|
||||||
|
@ -136,7 +136,7 @@ impl Ctx {
|
|||||||
|
|
||||||
fn collect_inner_items(&mut self, container: &SyntaxNode) {
|
fn collect_inner_items(&mut self, container: &SyntaxNode) {
|
||||||
let forced_vis = self.forced_visibility.take();
|
let forced_vis = self.forced_visibility.take();
|
||||||
let mut inner_items = mem::replace(&mut self.tree.inner_items, FxHashMap::default());
|
let mut inner_items = mem::take(&mut self.tree.inner_items);
|
||||||
inner_items.extend(
|
inner_items.extend(
|
||||||
container.descendants().skip(1).filter_map(ast::ModuleItem::cast).filter_map(|item| {
|
container.descendants().skip(1).filter_map(ast::ModuleItem::cast).filter_map(|item| {
|
||||||
let ast_id = self.source_ast_id_map.ast_id(&item);
|
let ast_id = self.source_ast_id_map.ast_id(&item);
|
||||||
|
Loading…
Reference in New Issue
Block a user