link_ordinal is available for foreign static
This commit is contained in:
parent
4a5e83c939
commit
e614bbcd30
4 changed files with 21 additions and 8 deletions
|
@ -1864,7 +1864,7 @@ impl CheckAttrVisitor<'_> {
|
|||
|
||||
fn check_link_ordinal(&self, attr: &Attribute, _span: Span, target: Target) -> bool {
|
||||
match target {
|
||||
Target::ForeignFn => true,
|
||||
Target::ForeignFn | Target::ForeignStatic => true,
|
||||
_ => {
|
||||
self.tcx.sess.emit_err(errors::LinkOrdinal { attr_span: attr.span });
|
||||
false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue