tests: add test for #105111
Enabling a tied feature should not enable the other feature automatically. This was fixed by something in #128796, probably #128221 or #128679.
This commit is contained in:
parent
11e760b7f4
commit
6edd86d58e
6 changed files with 75 additions and 0 deletions
20
tests/ui/target-feature/tied-features-no-implication-1.rs
Normal file
20
tests/ui/target-feature/tied-features-no-implication-1.rs
Normal file
|
@ -0,0 +1,20 @@
|
|||
//@ revisions: paca pacg
|
||||
//@ compile-flags: --crate-type=rlib --target=aarch64-unknown-linux-gnu
|
||||
//@ needs-llvm-components: aarch64
|
||||
//@[paca] compile-flags: -Ctarget-feature=+paca
|
||||
//@[paca] error-pattern: the target features paca, pacg must all be either enabled or disabled together
|
||||
//@[pacg] compile-flags: -Ctarget-feature=+pacg
|
||||
//@[paca] error-pattern: the target features paca, pacg must all be either enabled or disabled together
|
||||
#![feature(no_core, lang_items)]
|
||||
#![no_core]
|
||||
|
||||
#[lang="sized"]
|
||||
trait Sized {}
|
||||
|
||||
// In this test, demonstrate that +paca and +pacg both result in the tied feature error if there
|
||||
// isn't something causing an error.
|
||||
// See tied-features-no-implication.rs
|
||||
|
||||
#[cfg(target_feature = "pacg")]
|
||||
pub unsafe fn foo() {
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue