Ensure codegen_fn_attrs during collection.
This commit is contained in:
parent
928d14bcd1
commit
dba1503ed3
12 changed files with 103 additions and 129 deletions
|
@ -219,18 +219,6 @@ impl CheckAttrVisitor<'_> {
|
|||
return;
|
||||
}
|
||||
|
||||
// FIXME(@lcnr): this doesn't belong here.
|
||||
if matches!(
|
||||
target,
|
||||
Target::Closure
|
||||
| Target::Fn
|
||||
| Target::Method(_)
|
||||
| Target::ForeignFn
|
||||
| Target::ForeignStatic
|
||||
) {
|
||||
self.tcx.ensure().codegen_fn_attrs(self.tcx.hir().local_def_id(hir_id));
|
||||
}
|
||||
|
||||
self.check_repr(attrs, span, target, item, hir_id);
|
||||
self.check_used(attrs, target);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue