Skip to content

Commit 3ba0139

Browse files
committed
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.
1 parent c4a97d9 commit 3ba0139

File tree

8 files changed

+4
-44
lines changed

8 files changed

+4
-44
lines changed

tests/ui/asm/inline-syntax.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#![feature(no_core, lang_items, rustc_attrs)]
1717
#![crate_type = "rlib"]
1818
#![no_core]
19-
#![cfg_attr(x86_64_allowed, allow(bad_asm_style))]
19+
2020

2121
#[rustc_builtin_macro]
2222
macro_rules! asm {

tests/ui/cfg/cfg-panic-abort.rs

-4
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,11 @@
22
//@ compile-flags: -C panic=abort
33
//@ no-prefer-dynamic
44

5-
65
#[cfg(panic = "unwind")]
76
pub fn bad() -> i32 { }
87

98
#[cfg(not(panic = "abort"))]
109
pub fn bad() -> i32 { }
1110

12-
#[cfg(panic = "some_imaginary_future_panic_handler")]
13-
pub fn bad() -> i32 { }
14-
1511
#[cfg(panic = "abort")]
1612
pub fn main() { }

tests/ui/cfg/cfg-panic.rs

-4
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,11 @@
22
//@ compile-flags: -C panic=unwind
33
//@ needs-unwind
44

5-
65
#[cfg(panic = "abort")]
76
pub fn bad() -> i32 { }
87

98
#[cfg(not(panic = "unwind"))]
109
pub fn bad() -> i32 { }
1110

12-
#[cfg(panic = "some_imaginary_future_panic_handler")]
13-
pub fn bad() -> i32 { }
14-
1511
#[cfg(panic = "unwind")]
1612
pub fn main() { }

tests/ui/parser/issues/issue-103381.fixed

-15
Original file line numberDiff line numberDiff line change
@@ -37,21 +37,6 @@ fn should_ok_3() {
3737
if true && if true { true } else { false } {}
3838
}
3939

40-
fn shoule_match_ok() {
41-
#[cfg(feature = "full")]
42-
{
43-
let a = 1;
44-
let b = 2;
45-
if match a {
46-
1 if b == 1 => true,
47-
_ => false,
48-
} && if a > 1 { true } else { false }
49-
{
50-
true
51-
}
52-
}
53-
}
54-
5540
fn should_ok_in_nested() {
5641
if true && if true { true } else { false } { true } else { false };
5742
}

tests/ui/parser/issues/issue-103381.rs

-15
Original file line numberDiff line numberDiff line change
@@ -37,21 +37,6 @@ fn should_ok_3() {
3737
if true && if true { true } else { false } {}
3838
}
3939

40-
fn shoule_match_ok() {
41-
#[cfg(feature = "full")]
42-
{
43-
let a = 1;
44-
let b = 2;
45-
if match a {
46-
1 if b == 1 => true,
47-
_ => false,
48-
} && if a > 1 { true } else { false }
49-
{
50-
true
51-
}
52-
}
53-
}
54-
5540
fn should_ok_in_nested() {
5641
if true && if true { true } else { false } { true } else { false };
5742
}

tests/ui/sanitizer/cfg-kasan.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// the `#[cfg(sanitize = "address")]` attribute is configured.
33

44
//@ check-pass
5-
//@ compile-flags: -Zsanitizer=kernel-address --cfg kernel_address
5+
//@ compile-flags: -Zsanitizer=kernel-address
66
//@ revisions: aarch64 riscv64imac riscv64gc x86_64
77
//@[aarch64] compile-flags: --target aarch64-unknown-none
88
//@[aarch64] needs-llvm-components: aarch64
@@ -22,5 +22,5 @@ trait Sized {}
2222

2323
const _: fn() -> () = main;
2424

25-
#[cfg(all(sanitize = "address", kernel_address))]
25+
#[cfg(sanitize = "address")]
2626
fn main() {}

tests/ui/suggestions/option-to-bool.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![cfg_attr(let_chains, feature(let_chains))]
2-
31
fn foo(x: Option<i32>) {
42
if true && x {}
53
//~^ ERROR mismatched types

tests/ui/suggestions/option-to-bool.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0308]: mismatched types
2-
--> $DIR/option-to-bool.rs:4:16
2+
--> $DIR/option-to-bool.rs:2:16
33
|
44
LL | if true && x {}
55
| ---- ^ expected `bool`, found `Option<i32>`

0 commit comments

Comments
 (0)