Skip to content

Commit a53614a

Browse files
committed
Auto merge of rust-lang#13368 - oli-obk:bump_ui_test, r=flip1995
Bump ui_test This should give a bunch of ui improvements when lots of tests are running. Please lmk of any issues with it. Switching to `--quiet` should always avoid any issues, so there's a workaround if anything crops up. Also please check that this does not regress performance for you. It doesn't for me, but that doesn't mean much. changelog: none
2 parents 938f8ba + 1f13633 commit a53614a

22 files changed

+96
-30
lines changed

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ anstream = "0.6.0"
3131

3232
[dev-dependencies]
3333
cargo_metadata = "0.18.1"
34-
ui_test = "0.25"
34+
ui_test = "0.26.4"
3535
regex = "1.5.5"
3636
serde = { version = "1.0.145", features = ["derive"] }
3737
serde_json = "1.0.122"

tests/compile-test.rs

+4-6
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ use test_utils::IS_RUSTC_TEST_SUITE;
1313
use ui_test::custom_flags::rustfix::RustfixMode;
1414
use ui_test::custom_flags::Flag;
1515
use ui_test::spanned::Spanned;
16-
use ui_test::test_result::TestRun;
1716
use ui_test::{status_emitter, Args, CommandBuilder, Config, Match, OutputConflictHandling};
1817

1918
use std::collections::{BTreeMap, HashMap};
@@ -469,15 +468,14 @@ fn applicability_ord(applicability: &Applicability) -> u8 {
469468
impl Flag for DiagnosticCollector {
470469
fn post_test_action(
471470
&self,
472-
_config: &ui_test::per_test_config::TestConfig<'_>,
473-
_cmd: &mut std::process::Command,
471+
_config: &ui_test::per_test_config::TestConfig,
474472
output: &std::process::Output,
475-
_build_manager: &ui_test::build_manager::BuildManager<'_>,
476-
) -> Result<Vec<TestRun>, ui_test::Errored> {
473+
_build_manager: &ui_test::build_manager::BuildManager,
474+
) -> Result<(), ui_test::Errored> {
477475
if !output.stderr.is_empty() {
478476
self.sender.send(output.stderr.clone()).unwrap();
479477
}
480-
Ok(Vec::new())
478+
Ok(())
481479
}
482480

483481
fn clone_inner(&self) -> Box<dyn Flag> {

tests/ui/asm_syntax_not_x86.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
//@ignore-target-i686
2-
//@ignore-target-x86
1+
//@ignore-target: i686 x86
32
//@needs-asm-support
43

54
#[warn(clippy::inline_asm_x86_intel_syntax)]

tests/ui/asm_syntax_x86.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
//@revisions: i686 x86_64
2-
//@[i686] only-target-i686
3-
//@[x86_64] only-target-x86_64
1+
//@only-target: i686 x86_64
42

53
#[warn(clippy::inline_asm_x86_intel_syntax)]
64
mod warn_intel {

tests/ui/asm_syntax_x86.stderr

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
error: Intel x86 assembly syntax used
2+
--> tests/ui/asm_syntax_x86.rs:8:9
3+
|
4+
LL | asm!("");
5+
| ^^^^^^^^
6+
|
7+
= help: use AT&T x86 assembly syntax
8+
= note: `-D clippy::inline-asm-x86-intel-syntax` implied by `-D warnings`
9+
= help: to override `-D warnings` add `#[allow(clippy::inline_asm_x86_intel_syntax)]`
10+
11+
error: Intel x86 assembly syntax used
12+
--> tests/ui/asm_syntax_x86.rs:10:9
13+
|
14+
LL | asm!("", options());
15+
| ^^^^^^^^^^^^^^^^^^^
16+
|
17+
= help: use AT&T x86 assembly syntax
18+
19+
error: Intel x86 assembly syntax used
20+
--> tests/ui/asm_syntax_x86.rs:12:9
21+
|
22+
LL | asm!("", options(nostack));
23+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
24+
|
25+
= help: use AT&T x86 assembly syntax
26+
27+
error: Intel x86 assembly syntax used
28+
--> tests/ui/asm_syntax_x86.rs:18:5
29+
|
30+
LL | global_asm!("");
31+
| ^^^^^^^^^^^^^^^
32+
|
33+
= help: use AT&T x86 assembly syntax
34+
35+
error: Intel x86 assembly syntax used
36+
--> tests/ui/asm_syntax_x86.rs:20:5
37+
|
38+
LL | global_asm!("", options());
39+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
40+
|
41+
= help: use AT&T x86 assembly syntax
42+
43+
error: AT&T x86 assembly syntax used
44+
--> tests/ui/asm_syntax_x86.rs:33:9
45+
|
46+
LL | asm!("", options(att_syntax));
47+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
48+
|
49+
= help: use Intel x86 assembly syntax
50+
= note: `-D clippy::inline-asm-x86-att-syntax` implied by `-D warnings`
51+
= help: to override `-D warnings` add `#[allow(clippy::inline_asm_x86_att_syntax)]`
52+
53+
error: AT&T x86 assembly syntax used
54+
--> tests/ui/asm_syntax_x86.rs:35:9
55+
|
56+
LL | asm!("", options(nostack, att_syntax));
57+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
58+
|
59+
= help: use Intel x86 assembly syntax
60+
61+
error: AT&T x86 assembly syntax used
62+
--> tests/ui/asm_syntax_x86.rs:41:5
63+
|
64+
LL | global_asm!("", options(att_syntax));
65+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66+
|
67+
= help: use Intel x86 assembly syntax
68+
69+
error: aborting due to 8 previous errors
70+

tests/ui/crashes/ice-7410.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
//@compile-flags: -Clink-arg=-nostartfiles
2-
//@ignore-target-apple
3-
//@ignore-target-windows
2+
//@ignore-target: apple windows
43

54
#![feature(lang_items, start, libc)]
65
#![no_std]

tests/ui/crate_level_checks/entrypoint_recursion.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@ignore-target-apple
1+
//@ignore-target: apple
22

33
#![feature(rustc_attrs)]
44

tests/ui/crate_level_checks/no_std_main_recursion.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//@compile-flags: -Clink-arg=-nostartfiles
2-
//@ignore-target-apple
2+
//@ignore-target: apple
33

44
#![feature(lang_items, start, libc)]
55
#![no_std]

tests/ui/def_id_nocore.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@ignore-target-apple
1+
//@ignore-target: apple
22

33
#![feature(no_core, lang_items, start)]
44
#![no_core]

tests/ui/empty_loop_no_std.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//@compile-flags: -Clink-arg=-nostartfiles
2-
//@ignore-target-apple
2+
//@ignore-target: apple
33

44
#![warn(clippy::empty_loop)]
55
#![feature(lang_items, start, libc)]

tests/ui/enum_clike_unportable_variant.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@ignore-32bit
1+
//@ignore-bitwidth: 32
22

33
#![warn(clippy::enum_clike_unportable_variant)]
44
#![allow(unused, non_upper_case_globals)]

tests/ui/macro_use_imports.fixed

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//@aux-build:macro_use_helper.rs
33
//@aux-build:proc_macro_derive.rs
44

5-
//@ignore-32bit
5+
//@ignore-bitwidth: 32
66

77
#![allow(unused_imports, unreachable_code, unused_variables, dead_code, unused_attributes)]
88
#![allow(clippy::single_component_path_imports)]

tests/ui/macro_use_imports.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//@aux-build:macro_use_helper.rs
33
//@aux-build:proc_macro_derive.rs
44

5-
//@ignore-32bit
5+
//@ignore-bitwidth: 32
66

77
#![allow(unused_imports, unreachable_code, unused_variables, dead_code, unused_attributes)]
88
#![allow(clippy::single_component_path_imports)]

tests/ui/macro_use_imports_expect.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//@aux-build:macro_rules.rs
22
//@aux-build:macro_use_helper.rs
33
//@aux-build:proc_macro_derive.rs
4-
//@ignore-32bit
4+
//@ignore-bitwidth: 32
55

66
#![allow(unused_imports, unreachable_code, unused_variables, dead_code, unused_attributes)]
77
#![allow(clippy::single_component_path_imports)]

tests/ui/mixed_attributes_style.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ mod issue_12530 {
8282
#![allow(dead_code)]
8383
}
8484
}
85-
/// Nested mod //~ ERROR: item has both inner and outer attributes
85+
/// Nested mod
86+
//~^ ERROR: item has both inner and outer attributes
8687
#[allow(unused)]
8788
mod nest_mod_2 {
8889
#![allow(unused)]

tests/ui/mixed_attributes_style.stderr

+2-1
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,14 @@ error: item has both inner and outer attributes
4646
--> tests/ui/mixed_attributes_style.rs:85:5
4747
|
4848
LL | / /// Nested mod
49+
LL | |
4950
LL | | #[allow(unused)]
5051
LL | | mod nest_mod_2 {
5152
LL | | #![allow(unused)]
5253
| |_________________________^
5354

5455
error: item has both inner and outer attributes
55-
--> tests/ui/mixed_attributes_style.rs:90:9
56+
--> tests/ui/mixed_attributes_style.rs:91:9
5657
|
5758
LL | / #[allow(dead_code)]
5859
LL | | mod inner_mod {

tests/ui/non_octal_unix_permissions.fixed

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@ignore-target-windows
1+
//@ignore-target: windows
22

33
#![warn(clippy::non_octal_unix_permissions)]
44
use std::fs::{DirBuilder, File, OpenOptions, Permissions};

tests/ui/non_octal_unix_permissions.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@ignore-target-windows
1+
//@ignore-target: windows
22

33
#![warn(clippy::non_octal_unix_permissions)]
44
use std::fs::{DirBuilder, File, OpenOptions, Permissions};

tests/ui/result_large_err.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@ignore-32bit
1+
//@ignore-bitwidth: 32
22

33
#![warn(clippy::result_large_err)]
44
#![allow(clippy::large_enum_variant)]

tests/ui/single_call_fn.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@ignore-32bit
1+
//@ignore-bitwidth: 32
22
//@aux-build:proc_macros.rs
33
#![allow(clippy::redundant_closure_call, unused)]
44
#![warn(clippy::single_call_fn)]

tests/ui/transmute_32bit.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@ignore-64bit
1+
//@ignore-bitwidth: 64
22

33
#[warn(clippy::wrong_transmute)]
44
fn main() {

tests/ui/transmute_64bit.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@ignore-32bit
1+
//@ignore-bitwidth: 32
22

33
#[warn(clippy::wrong_transmute)]
44
fn main() {

0 commit comments

Comments
 (0)