Skip to content

Commit

Permalink
Auto merge of rust-lang#3587 - flip1995:ui-testing, r=phansch
Browse files Browse the repository at this point in the history
Use the -Zui-testing flag for compile-test tests

Like `@petrochenkov` suggested in rust-lang#3581 (comment)
  • Loading branch information
bors committed Dec 28, 2018
2 parents 32b3bc2 + d2dbd0b commit f7bdf50
Show file tree
Hide file tree
Showing 224 changed files with 4,706 additions and 4,703 deletions.
5 changes: 4 additions & 1 deletion tests/compile-test.rs
Expand Up @@ -55,7 +55,10 @@ fn config(mode: &str, dir: PathBuf) -> compiletest::Config {
config.run_lib_path = rustc_lib_path();
config.compile_lib_path = rustc_lib_path();
}
config.target_rustcflags = Some(format!("-L {0} -L {0}/deps -Dwarnings", host_libs().display()));
config.target_rustcflags = Some(format!(
"-L {0} -L {0}/deps -Dwarnings -Zui-testing",
host_libs().display()
));

config.mode = cfg_mode;
config.build_base = if rustc_test_suite().is_some() {
Expand Down
14 changes: 7 additions & 7 deletions tests/ui-toml/toml_blacklist/conf_french_blacklisted_name.stderr
@@ -1,45 +1,45 @@
error: use of a blacklisted/placeholder name `toto`
--> $DIR/conf_french_blacklisted_name.rs:15:9
|
15 | fn test(toto: ()) {}
LL | fn test(toto: ()) {}
| ^^^^
|
= note: `-D clippy::blacklisted-name` implied by `-D warnings`

error: use of a blacklisted/placeholder name `toto`
--> $DIR/conf_french_blacklisted_name.rs:18:9
|
18 | let toto = 42;
LL | let toto = 42;
| ^^^^

error: use of a blacklisted/placeholder name `tata`
--> $DIR/conf_french_blacklisted_name.rs:19:9
|
19 | let tata = 42;
LL | let tata = 42;
| ^^^^

error: use of a blacklisted/placeholder name `titi`
--> $DIR/conf_french_blacklisted_name.rs:20:9
|
20 | let titi = 42;
LL | let titi = 42;
| ^^^^

error: use of a blacklisted/placeholder name `toto`
--> $DIR/conf_french_blacklisted_name.rs:26:10
|
26 | (toto, Some(tata), titi @ Some(_)) => (),
LL | (toto, Some(tata), titi @ Some(_)) => (),
| ^^^^

error: use of a blacklisted/placeholder name `tata`
--> $DIR/conf_french_blacklisted_name.rs:26:21
|
26 | (toto, Some(tata), titi @ Some(_)) => (),
LL | (toto, Some(tata), titi @ Some(_)) => (),
| ^^^^

error: use of a blacklisted/placeholder name `titi`
--> $DIR/conf_french_blacklisted_name.rs:26:28
|
26 | (toto, Some(tata), titi @ Some(_)) => (),
LL | (toto, Some(tata), titi @ Some(_)) => (),
| ^^^^

error: aborting due to 7 previous errors
Expand Down
4 changes: 2 additions & 2 deletions tests/ui-toml/toml_trivially_copy/test.stderr
@@ -1,15 +1,15 @@
error: this argument is passed by reference, but would be more efficient if passed by value
--> $DIR/test.rs:20:11
|
20 | fn bad(x: &u16, y: &Foo) {}
LL | fn bad(x: &u16, y: &Foo) {}
| ^^^^ help: consider passing by value instead: `u16`
|
= note: `-D clippy::trivially-copy-pass-by-ref` implied by `-D warnings`

error: this argument is passed by reference, but would be more efficient if passed by value
--> $DIR/test.rs:20:20
|
20 | fn bad(x: &u16, y: &Foo) {}
LL | fn bad(x: &u16, y: &Foo) {}
| ^^^^ help: consider passing by value instead: `Foo`

error: aborting due to 2 previous errors
Expand Down
36 changes: 18 additions & 18 deletions tests/ui/absurd-extreme-comparisons.stderr
@@ -1,7 +1,7 @@
error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
--> $DIR/absurd-extreme-comparisons.rs:23:5
|
23 | u <= 0;
LL | u <= 0;
| ^^^^^^
|
= note: `-D clippy::absurd-extreme-comparisons` implied by `-D warnings`
Expand All @@ -10,135 +10,135 @@ error: this comparison involving the minimum or maximum element for this type co
error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
--> $DIR/absurd-extreme-comparisons.rs:24:5
|
24 | u <= Z;
LL | u <= Z;
| ^^^^^^
|
= help: because Z is the minimum value for this type, the case where the two sides are not equal never occurs, consider using u == Z instead

error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
--> $DIR/absurd-extreme-comparisons.rs:25:5
|
25 | u < Z;
LL | u < Z;
| ^^^^^
|
= help: because Z is the minimum value for this type, this comparison is always false

error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
--> $DIR/absurd-extreme-comparisons.rs:26:5
|
26 | Z >= u;
LL | Z >= u;
| ^^^^^^
|
= help: because Z is the minimum value for this type, the case where the two sides are not equal never occurs, consider using Z == u instead

error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
--> $DIR/absurd-extreme-comparisons.rs:27:5
|
27 | Z > u;
LL | Z > u;
| ^^^^^
|
= help: because Z is the minimum value for this type, this comparison is always false

error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
--> $DIR/absurd-extreme-comparisons.rs:28:5
|
28 | u > std::u32::MAX;
LL | u > std::u32::MAX;
| ^^^^^^^^^^^^^^^^^
|
= help: because std::u32::MAX is the maximum value for this type, this comparison is always false

error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
--> $DIR/absurd-extreme-comparisons.rs:29:5
|
29 | u >= std::u32::MAX;
LL | u >= std::u32::MAX;
| ^^^^^^^^^^^^^^^^^^
|
= help: because std::u32::MAX is the maximum value for this type, the case where the two sides are not equal never occurs, consider using u == std::u32::MAX instead

error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
--> $DIR/absurd-extreme-comparisons.rs:30:5
|
30 | std::u32::MAX < u;
LL | std::u32::MAX < u;
| ^^^^^^^^^^^^^^^^^
|
= help: because std::u32::MAX is the maximum value for this type, this comparison is always false

error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
--> $DIR/absurd-extreme-comparisons.rs:31:5
|
31 | std::u32::MAX <= u;
LL | std::u32::MAX <= u;
| ^^^^^^^^^^^^^^^^^^
|
= help: because std::u32::MAX is the maximum value for this type, the case where the two sides are not equal never occurs, consider using std::u32::MAX == u instead

error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
--> $DIR/absurd-extreme-comparisons.rs:32:5
|
32 | 1-1 > u;
LL | 1-1 > u;
| ^^^^^^^
|
= help: because 1-1 is the minimum value for this type, this comparison is always false

error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
--> $DIR/absurd-extreme-comparisons.rs:33:5
|
33 | u >= !0;
LL | u >= !0;
| ^^^^^^^
|
= help: because !0 is the maximum value for this type, the case where the two sides are not equal never occurs, consider using u == !0 instead

error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
--> $DIR/absurd-extreme-comparisons.rs:34:5
|
34 | u <= 12 - 2*6;
LL | u <= 12 - 2*6;
| ^^^^^^^^^^^^^
|
= help: because 12 - 2*6 is the minimum value for this type, the case where the two sides are not equal never occurs, consider using u == 12 - 2*6 instead

error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
--> $DIR/absurd-extreme-comparisons.rs:36:5
|
36 | i < -127 - 1;
LL | i < -127 - 1;
| ^^^^^^^^^^^^
|
= help: because -127 - 1 is the minimum value for this type, this comparison is always false

error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
--> $DIR/absurd-extreme-comparisons.rs:37:5
|
37 | std::i8::MAX >= i;
LL | std::i8::MAX >= i;
| ^^^^^^^^^^^^^^^^^
|
= help: because std::i8::MAX is the maximum value for this type, this comparison is always true

error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
--> $DIR/absurd-extreme-comparisons.rs:38:5
|
38 | 3-7 < std::i32::MIN;
LL | 3-7 < std::i32::MIN;
| ^^^^^^^^^^^^^^^^^^^
|
= help: because std::i32::MIN is the minimum value for this type, this comparison is always false

error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
--> $DIR/absurd-extreme-comparisons.rs:40:5
|
40 | b >= true;
LL | b >= true;
| ^^^^^^^^^
|
= help: because true is the maximum value for this type, the case where the two sides are not equal never occurs, consider using b == true instead

error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
--> $DIR/absurd-extreme-comparisons.rs:41:5
|
41 | false > b;
LL | false > b;
| ^^^^^^^^^
|
= help: because false is the minimum value for this type, this comparison is always false

error: <-comparison of unit values detected. This will always be false
--> $DIR/absurd-extreme-comparisons.rs:44:5
|
44 | () < {};
LL | () < {};
| ^^^^^^^
|
= note: #[deny(clippy::unit_cmp)] on by default
Expand Down
38 changes: 19 additions & 19 deletions tests/ui/approx_const.stderr
@@ -1,117 +1,117 @@
error: approximate value of `f{32, 64}::consts::E` found. Consider using it directly
--> $DIR/approx_const.rs:13:16
|
13 | let my_e = 2.7182;
LL | let my_e = 2.7182;
| ^^^^^^
|
= note: `-D clippy::approx-constant` implied by `-D warnings`

error: approximate value of `f{32, 64}::consts::E` found. Consider using it directly
--> $DIR/approx_const.rs:14:20
|
14 | let almost_e = 2.718;
LL | let almost_e = 2.718;
| ^^^^^

error: approximate value of `f{32, 64}::consts::FRAC_1_PI` found. Consider using it directly
--> $DIR/approx_const.rs:17:24
|
17 | let my_1_frac_pi = 0.3183;
LL | let my_1_frac_pi = 0.3183;
| ^^^^^^

error: approximate value of `f{32, 64}::consts::FRAC_1_SQRT_2` found. Consider using it directly
--> $DIR/approx_const.rs:20:28
|
20 | let my_frac_1_sqrt_2 = 0.70710678;
LL | let my_frac_1_sqrt_2 = 0.70710678;
| ^^^^^^^^^^

error: approximate value of `f{32, 64}::consts::FRAC_1_SQRT_2` found. Consider using it directly
--> $DIR/approx_const.rs:21:32
|
21 | let almost_frac_1_sqrt_2 = 0.70711;
LL | let almost_frac_1_sqrt_2 = 0.70711;
| ^^^^^^^

error: approximate value of `f{32, 64}::consts::FRAC_2_PI` found. Consider using it directly
--> $DIR/approx_const.rs:24:24
|
24 | let my_frac_2_pi = 0.63661977;
LL | let my_frac_2_pi = 0.63661977;
| ^^^^^^^^^^

error: approximate value of `f{32, 64}::consts::FRAC_2_SQRT_PI` found. Consider using it directly
--> $DIR/approx_const.rs:27:27
|
27 | let my_frac_2_sq_pi = 1.128379;
LL | let my_frac_2_sq_pi = 1.128379;
| ^^^^^^^^

error: approximate value of `f{32, 64}::consts::FRAC_PI_2` found. Consider using it directly
--> $DIR/approx_const.rs:30:24
|
30 | let my_frac_pi_2 = 1.57079632679;
LL | let my_frac_pi_2 = 1.57079632679;
| ^^^^^^^^^^^^^

error: approximate value of `f{32, 64}::consts::FRAC_PI_3` found. Consider using it directly
--> $DIR/approx_const.rs:33:24
|
33 | let my_frac_pi_3 = 1.04719755119;
LL | let my_frac_pi_3 = 1.04719755119;
| ^^^^^^^^^^^^^

error: approximate value of `f{32, 64}::consts::FRAC_PI_4` found. Consider using it directly
--> $DIR/approx_const.rs:36:24
|
36 | let my_frac_pi_4 = 0.785398163397;
LL | let my_frac_pi_4 = 0.785398163397;
| ^^^^^^^^^^^^^^

error: approximate value of `f{32, 64}::consts::FRAC_PI_6` found. Consider using it directly
--> $DIR/approx_const.rs:39:24
|
39 | let my_frac_pi_6 = 0.523598775598;
LL | let my_frac_pi_6 = 0.523598775598;
| ^^^^^^^^^^^^^^

error: approximate value of `f{32, 64}::consts::FRAC_PI_8` found. Consider using it directly
--> $DIR/approx_const.rs:42:24
|
42 | let my_frac_pi_8 = 0.3926990816987;
LL | let my_frac_pi_8 = 0.3926990816987;
| ^^^^^^^^^^^^^^^

error: approximate value of `f{32, 64}::consts::LN_10` found. Consider using it directly
--> $DIR/approx_const.rs:45:20
|
45 | let my_ln_10 = 2.302585092994046;
LL | let my_ln_10 = 2.302585092994046;
| ^^^^^^^^^^^^^^^^^

error: approximate value of `f{32, 64}::consts::LN_2` found. Consider using it directly
--> $DIR/approx_const.rs:48:19
|
48 | let my_ln_2 = 0.6931471805599453;
LL | let my_ln_2 = 0.6931471805599453;
| ^^^^^^^^^^^^^^^^^^

error: approximate value of `f{32, 64}::consts::LOG10_E` found. Consider using it directly
--> $DIR/approx_const.rs:51:22
|
51 | let my_log10_e = 0.4342944819032518;
LL | let my_log10_e = 0.4342944819032518;
| ^^^^^^^^^^^^^^^^^^

error: approximate value of `f{32, 64}::consts::LOG2_E` found. Consider using it directly
--> $DIR/approx_const.rs:54:21
|
54 | let my_log2_e = 1.4426950408889634;
LL | let my_log2_e = 1.4426950408889634;
| ^^^^^^^^^^^^^^^^^^

error: approximate value of `f{32, 64}::consts::PI` found. Consider using it directly
--> $DIR/approx_const.rs:57:17
|
57 | let my_pi = 3.1415;
LL | let my_pi = 3.1415;
| ^^^^^^

error: approximate value of `f{32, 64}::consts::PI` found. Consider using it directly
--> $DIR/approx_const.rs:58:21
|
58 | let almost_pi = 3.14;
LL | let almost_pi = 3.14;
| ^^^^

error: approximate value of `f{32, 64}::consts::SQRT_2` found. Consider using it directly
--> $DIR/approx_const.rs:61:18
|
61 | let my_sq2 = 1.4142;
LL | let my_sq2 = 1.4142;
| ^^^^^^

error: aborting due to 19 previous errors
Expand Down

0 comments on commit f7bdf50

Please sign in to comment.