link_ordinal attribute position is not restricted #100009
Labels
A-attributes
Area: Attributes (`#[…]`, `#![…]`)
C-bug
Category: This is a bug.
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
E-help-wanted
Call for participation: Help is requested to fix this issue.
F-raw_dylib
`#![feature(raw_dylib)]`
The
link_ordinal
attribute currently does not appear to have any restrictions on where it is located.The following code compiles without warning or error:
I expected to see this happen: An error when
link_ordinal
is placed in the wrong position.Instead, this happened:
link_ordinal
is ignored in wrong positions.The code in
CheckAttrVisitor
can be used to enforce this. Just add acheck_link_ordinal
method that validates its location (see the other methods for how to do that).Meta
The text was updated successfully, but these errors were encountered: