1
Fork 0

Add test for raw-dylib with an external variable

This commit is contained in:
Daniel Paoliello 2022-08-02 11:36:41 -07:00
parent fe3342816a
commit 0a754b309c
22 changed files with 133 additions and 9 deletions

View file

@ -209,7 +209,14 @@ impl CheckAttrVisitor<'_> {
}
// FIXME(@lcnr): this doesn't belong here.
if matches!(target, Target::Closure | Target::Fn | Target::Method(_) | Target::ForeignFn) {
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));
}