mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 00:03:43 +00:00
Modify some feature-gate tests to also check command-line handling
This commit is contained in:
parent
5ec7d6eee7
commit
9d6b2283d6
@ -1,5 +1,5 @@
|
||||
error[E0658]: link kind `link-arg` is unstable
|
||||
--> $DIR/feature-gate-link-arg-attribute.rs:1:15
|
||||
--> $DIR/feature-gate-link-arg-attribute.rs:5:15
|
||||
|
|
||||
LL | #[link(kind = "link-arg", name = "foo")]
|
||||
| ^^^^^^^^^^
|
@ -0,0 +1,2 @@
|
||||
error: unknown linking modifier `link-arg`, expected one of: bundle, verbatim, whole-archive, as-needed
|
||||
|
@ -1,5 +1,9 @@
|
||||
//@ revisions: in_attr in_flag
|
||||
//@[in_flag] compile-flags: -l dylib:+link-arg=foo
|
||||
|
||||
#[cfg(in_attr)]
|
||||
#[link(kind = "link-arg", name = "foo")]
|
||||
//~^ ERROR link kind `link-arg` is unstable
|
||||
//[in_attr]~^ ERROR link kind `link-arg` is unstable
|
||||
extern "C" {}
|
||||
|
||||
fn main() {}
|
||||
|
@ -1,5 +1,5 @@
|
||||
error[E0658]: linking modifier `as-needed` is unstable
|
||||
--> $DIR/feature-gate-native_link_modifiers_as_needed.rs:1:50
|
||||
--> $DIR/feature-gate-native_link_modifiers_as_needed.rs:5:50
|
||||
|
|
||||
LL | #[link(name = "foo", kind = "dylib", modifiers = "+as-needed")]
|
||||
| ^^^^^^^^^^^^
|
@ -0,0 +1,2 @@
|
||||
error: linking modifier `as-needed` is unstable and only accepted on the nightly compiler
|
||||
|
@ -1,5 +1,9 @@
|
||||
//@ revisions: in_attr in_flag
|
||||
//@[in_flag] compile-flags: -l dylib:+as-needed=foo
|
||||
|
||||
#[cfg(in_attr)]
|
||||
#[link(name = "foo", kind = "dylib", modifiers = "+as-needed")]
|
||||
//~^ ERROR: linking modifier `as-needed` is unstable
|
||||
//[in_attr]~^ ERROR: linking modifier `as-needed` is unstable
|
||||
extern "C" {}
|
||||
|
||||
fn main() {}
|
||||
|
Loading…
Reference in New Issue
Block a user