Auto merge of #100073 - dpaoliello:externvar, r=michaelwoerister
Add test for raw-dylib with an external variable All existing tests of link kind `raw-dylib` only validate the ability to link against functions, but it is also possible to link against variables. This adds tests for linking against a variable using `raw-dylib` both by-name and by-ordinal.
This commit is contained in:
commit
d77da9da84
22 changed files with 133 additions and 9 deletions
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue