Split PAuth target feature
This commit is contained in:
parent
56cd04af5c
commit
d39a6377e9
9 changed files with 148 additions and 15 deletions
4
src/test/ui/target-feature/tied-features-cli.one.stderr
Normal file
4
src/test/ui/target-feature/tied-features-cli.one.stderr
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
error: Target features paca, pacg must all be enabled or disabled together
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
9
src/test/ui/target-feature/tied-features-cli.rs
Normal file
9
src/test/ui/target-feature/tied-features-cli.rs
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
// 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
|
||||
|
||||
fn main() {}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
error: Target features paca, pacg must all be enabled or disabled together
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
4
src/test/ui/target-feature/tied-features-cli.two.stderr
Normal file
4
src/test/ui/target-feature/tied-features-cli.two.stderr
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
error: Target features paca, pacg must all be enabled or disabled together
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
29
src/test/ui/target-feature/tied-features.rs
Normal file
29
src/test/ui/target-feature/tied-features.rs
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
// only-aarch64
|
||||
// build-fail
|
||||
|
||||
#![feature(aarch64_target_feature, target_feature_11)]
|
||||
|
||||
fn main() {
|
||||
#[target_feature(enable = "pacg")]
|
||||
//~^ ERROR must all be either enabled or disabled together
|
||||
unsafe fn inner() {}
|
||||
|
||||
unsafe {
|
||||
foo();
|
||||
bar();
|
||||
baz();
|
||||
inner();
|
||||
}
|
||||
}
|
||||
|
||||
#[target_feature(enable = "paca")]
|
||||
//~^ ERROR must all be either enabled or disabled together
|
||||
unsafe fn foo() {}
|
||||
|
||||
|
||||
#[target_feature(enable = "paca,pacg")]
|
||||
unsafe fn bar() {}
|
||||
|
||||
#[target_feature(enable = "paca")]
|
||||
#[target_feature(enable = "pacg")]
|
||||
unsafe fn baz() {}
|
||||
18
src/test/ui/target-feature/tied-features.stderr
Normal file
18
src/test/ui/target-feature/tied-features.stderr
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
error: the target features paca, pacg must all be either enabled or disabled together
|
||||
--> $DIR/tied-features.rs:7:5
|
||||
|
|
||||
LL | #[target_feature(enable = "pacg")]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: add the missing features in a `target_feature` attribute
|
||||
|
||||
error: the target features paca, pacg must all be either enabled or disabled together
|
||||
--> $DIR/tied-features.rs:19:1
|
||||
|
|
||||
LL | #[target_feature(enable = "paca")]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: add the missing features in a `target_feature` attribute
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue