Repository navigation
do not complain about unstable target features on nightly #163428
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| //@ only-x86_64 | ||
| // FIXME: Once GCC backend is fixed, remove this `ignore-backends`. | ||
| //@ ignore-backends: gcc | ||
|
|
||
| // Ensure that on stable we don't suggest restricting with an unsafe trait and we continue | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What does this comment mean? It feels like it's not relevant to the test at all. (I'm porting this to be an UI test now in #164802)
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Uh, I probably accidentally copied this over from the run-make test I used as template... I was not able to make this a UI test because it tests stable-only behavior. But maybe there's now a way to do that?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yup, since #163664. Thanks for confirming! |
||
| // mentioning the rest of the obligation chain. | ||
|
|
||
| use run_make_support::{diff, rustc}; | ||
|
|
||
| fn main() { | ||
| let out = rustc() | ||
| .env("RUSTC_BOOTSTRAP", "-1") | ||
| .input("unstable-target-feature.rs") | ||
| .args(&["-Ctarget-feature=+x87", "--crate-type=rlib"]) | ||
| .run() | ||
| .assert_stderr_not_contains("help: consider restricting type parameter `T`") | ||
| .assert_stderr_contains("unstable feature") | ||
| .stderr_utf8(); | ||
| diff().expected_file("unstable-target-feature.stderr").actual_text("(stable rustc)", &out).run() | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| /// Tidy is unhappy if we leave the file empty. | ||
| pub fn empty() {} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| warning: unstable feature specified for `-Ctarget-feature`: `x87` | ||
| | | ||
| = note: this feature is not stably supported; its behavior can change in the future | ||
| = note: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! | ||
| = note: for more information, see issue #162235 <https://github.com/rust-lang/rust/issues/162235> | ||
|
|
||
| warning: 1 warning emitted | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,19 +1,13 @@ | ||
| warning: unstable feature specified for `-Ctarget-feature`: `v8plus` | ||
| | | ||
| = note: this feature is not stably supported; its behavior can change in the future | ||
| = note: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! | ||
| = note: for more information, see issue #162235 <https://github.com/rust-lang/rust/issues/162235> | ||
|
|
||
| warning: target feature `v8plus` must be disabled to ensure that the ABI of the current target can be implemented correctly | ||
| | | ||
| = note: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! | ||
| = note: for more information, see issue #162235 <https://github.com/rust-lang/rust/issues/162235> | ||
|
|
||
| error: +v8plus,+v9 | ||
| --> $DIR/sparcv8plus.rs:35:1 | ||
| --> $DIR/sparcv8plus.rs:34:1 | ||
| | | ||
| LL | compile_error!("+v8plus,+v9"); | ||
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
|
||
| error: aborting due to 1 previous error; 2 warnings emitted | ||
| error: aborting due to 1 previous error; 1 warning emitted | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,19 +1,13 @@ | ||
| warning: unstable feature specified for `-Ctarget-feature`: `v8plus` | ||
| | | ||
| = note: this feature is not stably supported; its behavior can change in the future | ||
| = note: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! | ||
| = note: for more information, see issue #162235 <https://github.com/rust-lang/rust/issues/162235> | ||
|
|
||
| warning: target feature `v8plus` must be disabled to ensure that the ABI of the current target can be implemented correctly | ||
| | | ||
| = note: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! | ||
| = note: for more information, see issue #162235 <https://github.com/rust-lang/rust/issues/162235> | ||
|
|
||
| error: +v8plus,-v9 (FIXME) | ||
| --> $DIR/sparcv8plus.rs:40:1 | ||
| --> $DIR/sparcv8plus.rs:39:1 | ||
| | | ||
| LL | compile_error!("+v8plus,-v9 (FIXME)"); | ||
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
|
||
| error: aborting due to 1 previous error; 2 warnings emitted | ||
| error: aborting due to 1 previous error; 1 warning emitted | ||
|
|
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if
rustc-env:RUSTC_BOOTSTRAP=1ever makes sense in a ui test, butrustc-env:RUSTC_BOOTSTRAP=-1definitely does not.Cc @jieyouxu
View changes since the review
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah... This is #t-compiler > Testing stable vs nightly behavior in UI tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay so
rustc-env:RUSTC_BOOTSTRAP=1is also pointless. I'll remove the example then.