Skip to content

Commit 072b0f6

Browse files
committed
rustc: removed unused DefPathData::Initializer DefId's for associated constants.
1 parent 8319ef5 commit 072b0f6

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

src/librustc/hir/map/def_collector.rs

+2-14
Original file line numberDiff line numberDiff line change
@@ -231,13 +231,7 @@ impl<'a> visit::Visitor<'a> for DefCollector<'a> {
231231
};
232232

233233
let def = self.create_def(ti.id, def_data, ITEM_LIKE_SPACE, ti.span);
234-
self.with_parent(def, |this| {
235-
if let TraitItemKind::Const(_, Some(ref expr)) = ti.node {
236-
this.visit_const_expr(expr);
237-
}
238-
239-
visit::walk_trait_item(this, ti);
240-
});
234+
self.with_parent(def, |this| visit::walk_trait_item(this, ti));
241235
}
242236

243237
fn visit_impl_item(&mut self, ii: &'a ImplItem) {
@@ -249,13 +243,7 @@ impl<'a> visit::Visitor<'a> for DefCollector<'a> {
249243
};
250244

251245
let def = self.create_def(ii.id, def_data, ITEM_LIKE_SPACE, ii.span);
252-
self.with_parent(def, |this| {
253-
if let ImplItemKind::Const(_, ref expr) = ii.node {
254-
this.visit_const_expr(expr);
255-
}
256-
257-
visit::walk_impl_item(this, ii);
258-
});
246+
self.with_parent(def, |this| visit::walk_impl_item(this, ii));
259247
}
260248

261249
fn visit_pat(&mut self, pat: &'a Pat) {

0 commit comments

Comments
 (0)