-
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.
- Loading branch information
1 parent
f4f0faf
commit 1f28e68
Showing
38 changed files
with
260 additions
and
159 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
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
9 changes: 4 additions & 5 deletions
9
tests/ui/async-await/async-closures/fn-exception-target-features.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
4 changes: 2 additions & 2 deletions
4
tests/ui/async-await/async-closures/fn-exception-target-features.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
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 |
---|---|---|
@@ -1,7 +1,6 @@ | ||
//@ compile-flags:-C panic=abort | ||
//@ only-x86_64 | ||
|
||
#![feature(target_feature_11)] | ||
#![no_std] | ||
#![no_main] | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
tests/ui/panic-handler/panic-handler-with-target-feature.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
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
6 changes: 0 additions & 6 deletions
6
tests/ui/rfcs/rfc-2396-target_feature-11/feature-gate-target_feature_11.rs
This file was deleted.
Oops, something went wrong.
15 changes: 0 additions & 15 deletions
15
tests/ui/rfcs/rfc-2396-target_feature-11/feature-gate-target_feature_11.stderr
This file was deleted.
Oops, something went wrong.
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,7 +1,5 @@ | ||
//@ only-x86_64 | ||
|
||
#![feature(target_feature_11)] | ||
|
||
#[target_feature(enable = "sse2")] | ||
fn foo() {} | ||
|
||
|
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
23 changes: 23 additions & 0 deletions
23
tests/ui/rfcs/rfc-2396-target_feature-11/fn-ptr.thir.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,23 @@ | ||
error[E0308]: mismatched types | ||
--> $DIR/fn-ptr.rs:9:21 | ||
| | ||
LL | #[target_feature(enable = "sse2")] | ||
| ---------------------------------- `#[target_feature]` added here | ||
... | ||
LL | let foo: fn() = foo; | ||
| ---- ^^^ cannot coerce functions with `#[target_feature]` to safe function pointers | ||
| | | ||
| expected due to this | ||
| | ||
= note: expected fn pointer `fn()` | ||
found fn item `fn() {foo}` | ||
= note: fn items are distinct from fn pointers | ||
= note: functions with `#[target_feature]` can only be coerced to `unsafe` function pointers | ||
help: consider casting to a fn pointer | ||
| | ||
LL | let foo: fn() = foo as fn(); | ||
| ~~~~~~~~~~~ | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0308`. |
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,7 +1,5 @@ | ||
//@ only-x86_64 | ||
|
||
#![feature(target_feature_11)] | ||
|
||
#[target_feature(enable = "avx")] | ||
fn foo() {} | ||
|
||
|
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: 0 additions & 2 deletions
2
tests/ui/rfcs/rfc-2396-target_feature-11/issue-108645-target-feature-on-main.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,7 +1,5 @@ | ||
//@ only-x86_64 | ||
|
||
#![feature(target_feature_11)] | ||
|
||
#[target_feature(enable = "avx2")] | ||
fn main() {} | ||
//~^ ERROR `main` function is not allowed to have `#[target_feature]` |
2 changes: 1 addition & 1 deletion
2
tests/ui/rfcs/rfc-2396-target_feature-11/issue-108645-target-feature-on-main.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
1 change: 0 additions & 1 deletion
1
tests/ui/rfcs/rfc-2396-target_feature-11/issue-108645-target-feature-on-start.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,7 +1,6 @@ | ||
//@ only-x86_64 | ||
|
||
#![feature(start)] | ||
#![feature(target_feature_11)] | ||
|
||
#[start] | ||
#[target_feature(enable = "avx2")] | ||
|
2 changes: 1 addition & 1 deletion
2
tests/ui/rfcs/rfc-2396-target_feature-11/issue-108645-target-feature-on-start.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
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 |
---|---|---|
@@ -1,7 +1,5 @@ | ||
//@ check-pass | ||
|
||
#![feature(target_feature_11)] | ||
|
||
struct S<T>(T) | ||
where | ||
[T; (|| {}, 1).1]: Copy; | ||
|
Oops, something went wrong.