Auto merge of #43109 - pnkfelix:fix-link_args-gate, r=nikomatsakis
Fix feature gate for `#[link_args(..)]` attribute Fix feature gate for `#[link_args(..)]` attribute so that it will fire regardless of context of attribute. See also #29596 and #43106
This commit is contained in:
commit
eb9dfb8bd9
2 changed files with 21 additions and 12 deletions
|
|
@ -9,12 +9,22 @@
|
|||
// except according to those terms.
|
||||
|
||||
// Test that `#[link_args]` attribute is gated by `link_args`
|
||||
// feature gate.
|
||||
// feature gate, both when it occurs where expected (atop
|
||||
// `extern { }` blocks) and where unexpected.
|
||||
|
||||
// gate-test-link_args
|
||||
|
||||
#[link_args = "aFdEfSeVEEE"]
|
||||
extern {}
|
||||
//~^ ERROR the `link_args` attribute is not portable across platforms
|
||||
// sidestep warning (which is correct, but misleading for
|
||||
// purposes of this test)
|
||||
#![allow(unused_attributes)]
|
||||
|
||||
fn main() { }
|
||||
#![link_args = "-l unexpected_use_as_inner_attr_on_mod"]
|
||||
//~^ ERROR the `link_args` attribute is experimental
|
||||
|
||||
#[link_args = "-l expected_use_case"]
|
||||
//~^ ERROR the `link_args` attribute is experimental
|
||||
extern {}
|
||||
|
||||
#[link_args = "-l unexected_use_on_non_extern_item"]
|
||||
//~^ ERROR: the `link_args` attribute is experimental
|
||||
fn main() {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue