Remove useless configs in tests
Since they are never set and don't have impact on the test. Or for the cfg-panic tests are already tested with check-cfg.
This commit is contained in:
parent
c4a97d9407
commit
3ba0139c66
@ -16,7 +16,7 @@
|
|||||||
#![feature(no_core, lang_items, rustc_attrs)]
|
#![feature(no_core, lang_items, rustc_attrs)]
|
||||||
#![crate_type = "rlib"]
|
#![crate_type = "rlib"]
|
||||||
#![no_core]
|
#![no_core]
|
||||||
#![cfg_attr(x86_64_allowed, allow(bad_asm_style))]
|
|
||||||
|
|
||||||
#[rustc_builtin_macro]
|
#[rustc_builtin_macro]
|
||||||
macro_rules! asm {
|
macro_rules! asm {
|
||||||
|
@ -2,15 +2,11 @@
|
|||||||
//@ compile-flags: -C panic=abort
|
//@ compile-flags: -C panic=abort
|
||||||
//@ no-prefer-dynamic
|
//@ no-prefer-dynamic
|
||||||
|
|
||||||
|
|
||||||
#[cfg(panic = "unwind")]
|
#[cfg(panic = "unwind")]
|
||||||
pub fn bad() -> i32 { }
|
pub fn bad() -> i32 { }
|
||||||
|
|
||||||
#[cfg(not(panic = "abort"))]
|
#[cfg(not(panic = "abort"))]
|
||||||
pub fn bad() -> i32 { }
|
pub fn bad() -> i32 { }
|
||||||
|
|
||||||
#[cfg(panic = "some_imaginary_future_panic_handler")]
|
|
||||||
pub fn bad() -> i32 { }
|
|
||||||
|
|
||||||
#[cfg(panic = "abort")]
|
#[cfg(panic = "abort")]
|
||||||
pub fn main() { }
|
pub fn main() { }
|
||||||
|
@ -2,15 +2,11 @@
|
|||||||
//@ compile-flags: -C panic=unwind
|
//@ compile-flags: -C panic=unwind
|
||||||
//@ needs-unwind
|
//@ needs-unwind
|
||||||
|
|
||||||
|
|
||||||
#[cfg(panic = "abort")]
|
#[cfg(panic = "abort")]
|
||||||
pub fn bad() -> i32 { }
|
pub fn bad() -> i32 { }
|
||||||
|
|
||||||
#[cfg(not(panic = "unwind"))]
|
#[cfg(not(panic = "unwind"))]
|
||||||
pub fn bad() -> i32 { }
|
pub fn bad() -> i32 { }
|
||||||
|
|
||||||
#[cfg(panic = "some_imaginary_future_panic_handler")]
|
|
||||||
pub fn bad() -> i32 { }
|
|
||||||
|
|
||||||
#[cfg(panic = "unwind")]
|
#[cfg(panic = "unwind")]
|
||||||
pub fn main() { }
|
pub fn main() { }
|
||||||
|
@ -37,21 +37,6 @@ fn should_ok_3() {
|
|||||||
if true && if true { true } else { false } {}
|
if true && if true { true } else { false } {}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn shoule_match_ok() {
|
|
||||||
#[cfg(feature = "full")]
|
|
||||||
{
|
|
||||||
let a = 1;
|
|
||||||
let b = 2;
|
|
||||||
if match a {
|
|
||||||
1 if b == 1 => true,
|
|
||||||
_ => false,
|
|
||||||
} && if a > 1 { true } else { false }
|
|
||||||
{
|
|
||||||
true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fn should_ok_in_nested() {
|
fn should_ok_in_nested() {
|
||||||
if true && if true { true } else { false } { true } else { false };
|
if true && if true { true } else { false } { true } else { false };
|
||||||
}
|
}
|
||||||
|
@ -37,21 +37,6 @@ fn should_ok_3() {
|
|||||||
if true && if true { true } else { false } {}
|
if true && if true { true } else { false } {}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn shoule_match_ok() {
|
|
||||||
#[cfg(feature = "full")]
|
|
||||||
{
|
|
||||||
let a = 1;
|
|
||||||
let b = 2;
|
|
||||||
if match a {
|
|
||||||
1 if b == 1 => true,
|
|
||||||
_ => false,
|
|
||||||
} && if a > 1 { true } else { false }
|
|
||||||
{
|
|
||||||
true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fn should_ok_in_nested() {
|
fn should_ok_in_nested() {
|
||||||
if true && if true { true } else { false } { true } else { false };
|
if true && if true { true } else { false } { true } else { false };
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// the `#[cfg(sanitize = "address")]` attribute is configured.
|
// the `#[cfg(sanitize = "address")]` attribute is configured.
|
||||||
|
|
||||||
//@ check-pass
|
//@ check-pass
|
||||||
//@ compile-flags: -Zsanitizer=kernel-address --cfg kernel_address
|
//@ compile-flags: -Zsanitizer=kernel-address
|
||||||
//@ revisions: aarch64 riscv64imac riscv64gc x86_64
|
//@ revisions: aarch64 riscv64imac riscv64gc x86_64
|
||||||
//@[aarch64] compile-flags: --target aarch64-unknown-none
|
//@[aarch64] compile-flags: --target aarch64-unknown-none
|
||||||
//@[aarch64] needs-llvm-components: aarch64
|
//@[aarch64] needs-llvm-components: aarch64
|
||||||
@ -22,5 +22,5 @@ trait Sized {}
|
|||||||
|
|
||||||
const _: fn() -> () = main;
|
const _: fn() -> () = main;
|
||||||
|
|
||||||
#[cfg(all(sanitize = "address", kernel_address))]
|
#[cfg(sanitize = "address")]
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
#![cfg_attr(let_chains, feature(let_chains))]
|
|
||||||
|
|
||||||
fn foo(x: Option<i32>) {
|
fn foo(x: Option<i32>) {
|
||||||
if true && x {}
|
if true && x {}
|
||||||
//~^ ERROR mismatched types
|
//~^ ERROR mismatched types
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
error[E0308]: mismatched types
|
error[E0308]: mismatched types
|
||||||
--> $DIR/option-to-bool.rs:4:16
|
--> $DIR/option-to-bool.rs:2:16
|
||||||
|
|
|
|
||||||
LL | if true && x {}
|
LL | if true && x {}
|
||||||
| ---- ^ expected `bool`, found `Option<i32>`
|
| ---- ^ expected `bool`, found `Option<i32>`
|
||||||
|
Loading…
Reference in New Issue
Block a user