-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix feature gate checking of static-nobundle and native_link_modifiers
- Loading branch information
Showing
8 changed files
with
75 additions
and
43 deletions.
There are no files selected for viewing
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
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
10 changes: 10 additions & 0 deletions
10
src/test/ui/feature-gates/feature-gate-native_link_modifiers_bundle-2.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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Test native_link_modifiers_bundle don't need static-nobundle | ||
// check-pass | ||
|
||
#![feature(native_link_modifiers)] | ||
#![feature(native_link_modifiers_bundle)] | ||
|
||
#[link(name = "foo", kind = "static", modifiers = "-bundle")] | ||
extern "C" {} | ||
|
||
fn main() {} |
3 changes: 3 additions & 0 deletions
3
src/test/ui/feature-gates/feature-gate-native_link_modifiers_bundle-3.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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// compile-flags: -l static:-bundle=nonexistent | ||
|
||
fn main() {} |
2 changes: 2 additions & 0 deletions
2
src/test/ui/feature-gates/feature-gate-native_link_modifiers_bundle-3.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 modifiers are currently unstable, the `-Z unstable-options` flag must also be passed to use it | ||
|
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,6 +1,4 @@ | ||
//~ ERROR kind="static-nobundle" is unstable | ||
// Test the behavior of rustc when non-existent library is statically linked | ||
|
||
// check-pass | ||
// compile-flags: -l static-nobundle=nonexistent | ||
|
||
fn main() {} |
8 changes: 0 additions & 8 deletions
8
src/test/ui/feature-gates/feature-gate-static-nobundle-2.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 |
---|---|---|
@@ -1,10 +1,2 @@ | ||
warning: library kind `static-nobundle` has been superseded by specifying `-bundle` on library kind `static`. Try `static:-bundle` | ||
|
||
error[E0658]: kind="static-nobundle" is unstable | ||
| | ||
= note: see issue #37403 <https://github.com/rust-lang/rust/issues/37403> for more information | ||
= help: add `#![feature(static_nobundle)]` to the crate attributes to enable | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0658`. |
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