Skip to content

Fix compilation on rustc 1.20.0-nightly (067971139 2017-07-02) #1868

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 3, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 1 addition & 17 deletions clippy_tests/examples/absurd-extreme-comparisons.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ error: this comparison involving the minimum or maximum element for this type co
11 | u <= Z;
| ^^^^^^
|
= note: `-D absurd-extreme-comparisons` implied by `-D warnings`
= 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
Expand All @@ -22,7 +21,6 @@ error: this comparison involving the minimum or maximum element for this type co
12 | u < Z;
| ^^^^^
|
= note: `-D absurd-extreme-comparisons` implied by `-D warnings`
= 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
Expand All @@ -31,7 +29,6 @@ error: this comparison involving the minimum or maximum element for this type co
13 | Z >= u;
| ^^^^^^
|
= note: `-D absurd-extreme-comparisons` implied by `-D warnings`
= 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
Expand All @@ -40,7 +37,6 @@ error: this comparison involving the minimum or maximum element for this type co
14 | Z > u;
| ^^^^^
|
= note: `-D absurd-extreme-comparisons` implied by `-D warnings`
= 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
Expand All @@ -49,7 +45,6 @@ error: this comparison involving the minimum or maximum element for this type co
15 | u > std::u32::MAX;
| ^^^^^^^^^^^^^^^^^
|
= note: `-D absurd-extreme-comparisons` implied by `-D warnings`
= 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
Expand All @@ -58,7 +53,6 @@ error: this comparison involving the minimum or maximum element for this type co
16 | u >= std::u32::MAX;
| ^^^^^^^^^^^^^^^^^^
|
= note: `-D absurd-extreme-comparisons` implied by `-D warnings`
= 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
Expand All @@ -67,7 +61,6 @@ error: this comparison involving the minimum or maximum element for this type co
17 | std::u32::MAX < u;
| ^^^^^^^^^^^^^^^^^
|
= note: `-D absurd-extreme-comparisons` implied by `-D warnings`
= 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
Expand All @@ -76,7 +69,6 @@ error: this comparison involving the minimum or maximum element for this type co
18 | std::u32::MAX <= u;
| ^^^^^^^^^^^^^^^^^^
|
= note: `-D absurd-extreme-comparisons` implied by `-D warnings`
= 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
Expand All @@ -85,7 +77,6 @@ error: this comparison involving the minimum or maximum element for this type co
19 | 1-1 > u;
| ^^^^^^^
|
= note: `-D absurd-extreme-comparisons` implied by `-D warnings`
= 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
Expand All @@ -94,7 +85,6 @@ error: this comparison involving the minimum or maximum element for this type co
20 | u >= !0;
| ^^^^^^^
|
= note: `-D absurd-extreme-comparisons` implied by `-D warnings`
= 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
Expand All @@ -103,7 +93,6 @@ error: this comparison involving the minimum or maximum element for this type co
21 | u <= 12 - 2*6;
| ^^^^^^^^^^^^^
|
= note: `-D absurd-extreme-comparisons` implied by `-D warnings`
= 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
Expand All @@ -112,7 +101,6 @@ error: this comparison involving the minimum or maximum element for this type co
23 | i < -127 - 1;
| ^^^^^^^^^^^^
|
= note: `-D absurd-extreme-comparisons` implied by `-D warnings`
= 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
Expand All @@ -121,7 +109,6 @@ error: this comparison involving the minimum or maximum element for this type co
24 | std::i8::MAX >= i;
| ^^^^^^^^^^^^^^^^^
|
= note: `-D absurd-extreme-comparisons` implied by `-D warnings`
= 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
Expand All @@ -130,7 +117,6 @@ error: this comparison involving the minimum or maximum element for this type co
25 | 3-7 < std::i32::MIN;
| ^^^^^^^^^^^^^^^^^^^
|
= note: `-D absurd-extreme-comparisons` implied by `-D warnings`
= 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
Expand All @@ -139,7 +125,6 @@ error: this comparison involving the minimum or maximum element for this type co
27 | b >= true;
| ^^^^^^^^^
|
= note: `-D absurd-extreme-comparisons` implied by `-D warnings`
= 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
Expand All @@ -148,7 +133,6 @@ error: this comparison involving the minimum or maximum element for this type co
28 | false > b;
| ^^^^^^^^^
|
= note: `-D absurd-extreme-comparisons` implied by `-D warnings`
= 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
Expand All @@ -159,7 +143,7 @@ error: <-comparison of unit values detected. This will always be false
|
= note: `-D unit-cmp` implied by `-D warnings`

error: aborting due to previous error(s)
error: aborting due to 18 previous errors


To learn more, run the command again with --verbose.
38 changes: 1 addition & 37 deletions clippy_tests/examples/approx_const.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -11,146 +11,110 @@ error: approximate value of `f{32, 64}::consts::E` found. Consider using it dire
|
8 | let almost_e = 2.718;
| ^^^^^
|
= note: `-D approx-constant` implied by `-D warnings`

error: approximate value of `f{32, 64}::consts::FRAC_1_PI` found. Consider using it directly
--> approx_const.rs:11:24
|
11 | let my_1_frac_pi = 0.3183;
| ^^^^^^
|
= note: `-D approx-constant` implied by `-D warnings`

error: approximate value of `f{32, 64}::consts::FRAC_1_SQRT_2` found. Consider using it directly
--> approx_const.rs:14:28
|
14 | let my_frac_1_sqrt_2 = 0.70710678;
| ^^^^^^^^^^
|
= note: `-D approx-constant` implied by `-D warnings`

error: approximate value of `f{32, 64}::consts::FRAC_1_SQRT_2` found. Consider using it directly
--> approx_const.rs:15:32
|
15 | let almost_frac_1_sqrt_2 = 0.70711;
| ^^^^^^^
|
= note: `-D approx-constant` implied by `-D warnings`

error: approximate value of `f{32, 64}::consts::FRAC_2_PI` found. Consider using it directly
--> approx_const.rs:18:24
|
18 | let my_frac_2_pi = 0.63661977;
| ^^^^^^^^^^
|
= note: `-D approx-constant` implied by `-D warnings`

error: approximate value of `f{32, 64}::consts::FRAC_2_SQRT_PI` found. Consider using it directly
--> approx_const.rs:21:27
|
21 | let my_frac_2_sq_pi = 1.128379;
| ^^^^^^^^
|
= note: `-D approx-constant` implied by `-D warnings`

error: approximate value of `f{32, 64}::consts::FRAC_PI_2` found. Consider using it directly
--> approx_const.rs:24:24
|
24 | let my_frac_pi_2 = 1.57079632679;
| ^^^^^^^^^^^^^
|
= note: `-D approx-constant` implied by `-D warnings`

error: approximate value of `f{32, 64}::consts::FRAC_PI_3` found. Consider using it directly
--> approx_const.rs:27:24
|
27 | let my_frac_pi_3 = 1.04719755119;
| ^^^^^^^^^^^^^
|
= note: `-D approx-constant` implied by `-D warnings`

error: approximate value of `f{32, 64}::consts::FRAC_PI_4` found. Consider using it directly
--> approx_const.rs:30:24
|
30 | let my_frac_pi_4 = 0.785398163397;
| ^^^^^^^^^^^^^^
|
= note: `-D approx-constant` implied by `-D warnings`

error: approximate value of `f{32, 64}::consts::FRAC_PI_6` found. Consider using it directly
--> approx_const.rs:33:24
|
33 | let my_frac_pi_6 = 0.523598775598;
| ^^^^^^^^^^^^^^
|
= note: `-D approx-constant` implied by `-D warnings`

error: approximate value of `f{32, 64}::consts::FRAC_PI_8` found. Consider using it directly
--> approx_const.rs:36:24
|
36 | let my_frac_pi_8 = 0.3926990816987;
| ^^^^^^^^^^^^^^^
|
= note: `-D approx-constant` implied by `-D warnings`

error: approximate value of `f{32, 64}::consts::LN_10` found. Consider using it directly
--> approx_const.rs:39:20
|
39 | let my_ln_10 = 2.302585092994046;
| ^^^^^^^^^^^^^^^^^
|
= note: `-D approx-constant` implied by `-D warnings`

error: approximate value of `f{32, 64}::consts::LN_2` found. Consider using it directly
--> approx_const.rs:42:19
|
42 | let my_ln_2 = 0.6931471805599453;
| ^^^^^^^^^^^^^^^^^^
|
= note: `-D approx-constant` implied by `-D warnings`

error: approximate value of `f{32, 64}::consts::LOG10_E` found. Consider using it directly
--> approx_const.rs:45:22
|
45 | let my_log10_e = 0.43429448190325182;
| ^^^^^^^^^^^^^^^^^^^
|
= note: `-D approx-constant` implied by `-D warnings`

error: approximate value of `f{32, 64}::consts::LOG2_E` found. Consider using it directly
--> approx_const.rs:48:21
|
48 | let my_log2_e = 1.4426950408889634;
| ^^^^^^^^^^^^^^^^^^
|
= note: `-D approx-constant` implied by `-D warnings`

error: approximate value of `f{32, 64}::consts::PI` found. Consider using it directly
--> approx_const.rs:51:17
|
51 | let my_pi = 3.1415;
| ^^^^^^
|
= note: `-D approx-constant` implied by `-D warnings`

error: approximate value of `f{32, 64}::consts::PI` found. Consider using it directly
--> approx_const.rs:52:21
|
52 | let almost_pi = 3.14;
| ^^^^
|
= note: `-D approx-constant` implied by `-D warnings`

error: approximate value of `f{32, 64}::consts::SQRT_2` found. Consider using it directly
--> approx_const.rs:55:18
|
55 | let my_sq2 = 1.4142;
| ^^^^^^
|
= note: `-D approx-constant` implied by `-D warnings`

error: aborting due to previous error(s)
error: aborting due to 19 previous errors


To learn more, run the command again with --verbose.
20 changes: 1 addition & 19 deletions clippy_tests/examples/arithmetic.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -11,33 +11,25 @@ error: integer arithmetic detected
|
9 | i * 2;
| ^^^^^
|
= note: `-D integer-arithmetic` implied by `-D warnings`

error: integer arithmetic detected
--> arithmetic.rs:10:5
|
10 | / 1 %
11 | | i / 2; // no error, this is part of the expression in the preceding line
| |_________^
|
= note: `-D integer-arithmetic` implied by `-D warnings`

error: integer arithmetic detected
--> arithmetic.rs:12:5
|
12 | i - 2 + 2 - i;
| ^^^^^^^^^^^^^
|
= note: `-D integer-arithmetic` implied by `-D warnings`

error: integer arithmetic detected
--> arithmetic.rs:13:5
|
13 | -i;
| ^^
|
= note: `-D integer-arithmetic` implied by `-D warnings`

error: floating-point arithmetic detected
--> arithmetic.rs:23:5
Expand All @@ -52,42 +44,32 @@ error: floating-point arithmetic detected
|
25 | 1.0 + f;
| ^^^^^^^
|
= note: `-D float-arithmetic` implied by `-D warnings`

error: floating-point arithmetic detected
--> arithmetic.rs:26:5
|
26 | f * 2.0;
| ^^^^^^^
|
= note: `-D float-arithmetic` implied by `-D warnings`

error: floating-point arithmetic detected
--> arithmetic.rs:27:5
|
27 | f / 2.0;
| ^^^^^^^
|
= note: `-D float-arithmetic` implied by `-D warnings`

error: floating-point arithmetic detected
--> arithmetic.rs:28:5
|
28 | f - 2.0 * 4.2;
| ^^^^^^^^^^^^^
|
= note: `-D float-arithmetic` implied by `-D warnings`

error: floating-point arithmetic detected
--> arithmetic.rs:29:5
|
29 | -f;
| ^^
|
= note: `-D float-arithmetic` implied by `-D warnings`

error: aborting due to previous error(s)
error: aborting due to 11 previous errors


To learn more, run the command again with --verbose.
Loading