collect attrs in const block expr
This commit is contained in:
parent
1d96de2a20
commit
1e42bb606d
3 changed files with 20 additions and 0 deletions
|
@ -343,6 +343,9 @@ impl<'a, 'b, 'tcx> visit::Visitor<'a> for DefCollector<'a, 'b, 'tcx> {
|
|||
self.create_def(expr.id, kw::Empty, DefKind::Closure, expr.span)
|
||||
}
|
||||
ExprKind::ConstBlock(ref constant) => {
|
||||
for attr in &expr.attrs {
|
||||
visit::walk_attribute(self, attr);
|
||||
}
|
||||
let def = self.create_def(
|
||||
constant.id,
|
||||
kw::Empty,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue