-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modify some feature-gate tests to also check command-line handling
- Loading branch information
Showing
6 changed files
with
16 additions
and
4 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
...es/feature-gate-link-arg-attribute.stderr → ...re-gate-link-arg-attribute.in_attr.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
tests/ui/feature-gates/feature-gate-link-arg-attribute.in_flag.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
error: unknown linking modifier `link-arg`, expected one of: bundle, verbatim, whole-archive, as-needed | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() {} |
2 changes: 1 addition & 1 deletion
2
...te-native_link_modifiers_as_needed.stderr → ...e_link_modifiers_as_needed.in_attr.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
tests/ui/feature-gates/feature-gate-native_link_modifiers_as_needed.in_flag.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
error: linking modifier `as-needed` is unstable and only accepted on the nightly compiler | ||
|
6 changes: 5 additions & 1 deletion
6
tests/ui/feature-gates/feature-gate-native_link_modifiers_as_needed.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() {} |