forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Direct users towards using Rust feature names in CLI
If they are trying to use features rustc doesn't yet know about, request a feature request. Additionally, also warn against using feature names without leading `+` or `-` signs.
- Loading branch information
Showing
13 changed files
with
214 additions
and
90 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
// compile-flags: -Ctarget-feature=banana --crate-type=rlib | ||
// build-pass |
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,18 @@ | ||
warning: unknown feature specified for `-Ctarget-feature`: `banana` | ||
| | ||
= note: features must begin with a `+` to enable or `-` to disable it | ||
|
||
warning: unknown feature specified for `-Ctarget-feature`: `banana` | ||
| | ||
= note: features must begin with a `+` to enable or `-` to disable it | ||
|
||
warning: unknown feature specified for `-Ctarget-feature`: `banana` | ||
| | ||
= note: features must begin with a `+` to enable or `-` to disable it | ||
|
||
warning: unknown feature specified for `-Ctarget-feature`: `banana` | ||
| | ||
= note: features must begin with a `+` to enable or `-` to disable it | ||
|
||
warning: 4 warnings emitted | ||
|
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,6 @@ | ||
// compile-flags: -Ctarget-feature=+rdrnd --crate-type=rlib --target=x86_64-unknown-linux-gnu | ||
// build-pass | ||
// needs-llvm-components: x86 | ||
|
||
#![feature(no_core)] | ||
#![no_core] |
22 changes: 22 additions & 0 deletions
22
src/test/ui/target-feature/similar-feature-suggestion.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,22 @@ | ||
warning: unknown feature specified for `-Ctarget-feature`: `rdrnd` | ||
| | ||
= note: it is still passed through to the codegen backend | ||
= help: you might have meant: `rdrand` | ||
|
||
warning: unknown feature specified for `-Ctarget-feature`: `rdrnd` | ||
| | ||
= note: it is still passed through to the codegen backend | ||
= help: did you mean: `rdrand` | ||
|
||
warning: unknown feature specified for `-Ctarget-feature`: `rdrnd` | ||
| | ||
= note: it is still passed through to the codegen backend | ||
= help: did you mean: `rdrand` | ||
|
||
warning: unknown feature specified for `-Ctarget-feature`: `rdrnd` | ||
| | ||
= note: it is still passed through to the codegen backend | ||
= help: did you mean: `rdrand` | ||
|
||
warning: 4 warnings emitted | ||
|
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,4 +1,4 @@ | ||
error: Target features paca, pacg must all be enabled or disabled together | ||
error: target features paca, pacg must all be enabled or disabled together | ||
|
||
error: aborting due to previous error | ||
|
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,9 +1,20 @@ | ||
// only-aarch64 | ||
// revisions: one two three four | ||
//[one] compile-flags: -C target-feature=+paca | ||
//[two] compile-flags: -C target-feature=-pacg,+pacg | ||
//[three] compile-flags: -C target-feature=+paca,+pacg,-paca | ||
//[four] check-pass | ||
//[four] compile-flags: -C target-feature=-paca,+pacg -C target-feature=+paca | ||
// revisions: one two three | ||
// compile-flags: --crate-type=rlib --target=aarch64-unknown-linux-gnu | ||
// needs-llvm-components: aarch64 | ||
// | ||
// | ||
// [one] check-fail | ||
// [one] compile-flags: -C target-feature=+paca | ||
// [two] check-fail | ||
// [two] compile-flags: -C target-feature=-pacg,+pacg | ||
// [three] check-fail | ||
// [three] compile-flags: -C target-feature=+paca,+pacg,-paca | ||
// [four] build-pass | ||
// [four] compile-flags: -C target-feature=-paca,+pacg -C target-feature=+paca | ||
#![feature(no_core, lang_items)] | ||
#![no_core] | ||
|
||
#[lang="sized"] | ||
trait Sized {} | ||
|
||
fn main() {} |
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,4 +1,4 @@ | ||
error: Target features paca, pacg must all be enabled or disabled together | ||
error: target features paca, pacg must all be enabled or disabled together | ||
|
||
error: aborting due to previous error | ||
|
Oops, something went wrong.