Merge pull request #1868 from messense/feature/fix-nightly-07-02

Fix compilation on rustc 1.20.0-nightly (067971139 2017-07-02)
This commit is contained in:
Oliver Schneider 2017-07-03 09:22:12 +02:00 committed by GitHub
commit 1f519f2b64
134 changed files with 150 additions and 1803 deletions

View file

@ -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
@ -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
@ -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
@ -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
@ -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
@ -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
@ -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
@ -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
@ -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
@ -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
@ -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
@ -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
@ -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
@ -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
@ -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
@ -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
@ -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.

View file

@ -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.

View file

@ -11,8 +11,6 @@ error: integer arithmetic detected
|
9 | i * 2;
| ^^^^^
|
= note: `-D integer-arithmetic` implied by `-D warnings`
error: integer arithmetic detected
--> arithmetic.rs:10:5
@ -20,24 +18,18 @@ error: integer arithmetic detected
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
@ -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.

View file

@ -11,48 +11,36 @@ error: const index is out of bounds
|
13 | x[1 << 3];
| ^^^^^^^^^
|
= note: `-D out-of-bounds-indexing` implied by `-D warnings`
error: range is out of bounds
--> array_indexing.rs:14:6
|
14 | &x[1..5];
| ^^^^^^^
|
= note: `-D out-of-bounds-indexing` implied by `-D warnings`
error: range is out of bounds
--> array_indexing.rs:16:6
|
16 | &x[0...4];
| ^^^^^^^^
|
= note: `-D out-of-bounds-indexing` implied by `-D warnings`
error: range is out of bounds
--> array_indexing.rs:17:6
|
17 | &x[...4];
| ^^^^^^^
|
= note: `-D out-of-bounds-indexing` implied by `-D warnings`
error: range is out of bounds
--> array_indexing.rs:21:6
|
21 | &x[5..];
| ^^^^^^
|
= note: `-D out-of-bounds-indexing` implied by `-D warnings`
error: range is out of bounds
--> array_indexing.rs:23:6
|
23 | &x[..5];
| ^^^^^^
|
= note: `-D out-of-bounds-indexing` implied by `-D warnings`
error: indexing may panic
--> array_indexing.rs:26:5
@ -67,90 +55,68 @@ error: slicing may panic
|
27 | &y[1..2];
| ^^^^^^^
|
= note: `-D indexing-slicing` implied by `-D warnings`
error: slicing may panic
--> array_indexing.rs:29:6
|
29 | &y[0...4];
| ^^^^^^^^
|
= note: `-D indexing-slicing` implied by `-D warnings`
error: slicing may panic
--> array_indexing.rs:30:6
|
30 | &y[...4];
| ^^^^^^^
|
= note: `-D indexing-slicing` implied by `-D warnings`
error: const index is out of bounds
--> array_indexing.rs:33:5
|
33 | empty[0];
| ^^^^^^^^
|
= note: `-D out-of-bounds-indexing` implied by `-D warnings`
error: range is out of bounds
--> array_indexing.rs:34:6
|
34 | &empty[1..5];
| ^^^^^^^^^^^
|
= note: `-D out-of-bounds-indexing` implied by `-D warnings`
error: range is out of bounds
--> array_indexing.rs:35:6
|
35 | &empty[0...4];
| ^^^^^^^^^^^^
|
= note: `-D out-of-bounds-indexing` implied by `-D warnings`
error: range is out of bounds
--> array_indexing.rs:36:6
|
36 | &empty[...4];
| ^^^^^^^^^^^
|
= note: `-D out-of-bounds-indexing` implied by `-D warnings`
error: range is out of bounds
--> array_indexing.rs:40:6
|
40 | &empty[0...0];
| ^^^^^^^^^^^^
|
= note: `-D out-of-bounds-indexing` implied by `-D warnings`
error: range is out of bounds
--> array_indexing.rs:41:6
|
41 | &empty[...0];
| ^^^^^^^^^^^
|
= note: `-D out-of-bounds-indexing` implied by `-D warnings`
error: range is out of bounds
--> array_indexing.rs:43:6
|
43 | &empty[1..];
| ^^^^^^^^^^
|
= note: `-D out-of-bounds-indexing` implied by `-D warnings`
error: range is out of bounds
--> array_indexing.rs:44:6
|
44 | &empty[..4];
| ^^^^^^^^^^
|
= note: `-D out-of-bounds-indexing` 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.

View file

@ -11,96 +11,72 @@ error: assign operation detected
|
9 | i += 2 + 17;
| ^^^^^^^^^^^ help: replace it with `i = i + 2 + 17`
|
= note: `-D assign-ops` implied by `-D warnings`
error: assign operation detected
--> assign_ops.rs:10:5
|
10 | i -= 6;
| ^^^^^^ help: replace it with `i = i - 6`
|
= note: `-D assign-ops` implied by `-D warnings`
error: assign operation detected
--> assign_ops.rs:11:5
|
11 | i -= 2 - 1;
| ^^^^^^^^^^ help: replace it with `i = i - (2 - 1)`
|
= note: `-D assign-ops` implied by `-D warnings`
error: assign operation detected
--> assign_ops.rs:12:5
|
12 | i *= 5;
| ^^^^^^ help: replace it with `i = i * 5`
|
= note: `-D assign-ops` implied by `-D warnings`
error: assign operation detected
--> assign_ops.rs:13:5
|
13 | i *= 1+5;
| ^^^^^^^^ help: replace it with `i = i * (1+5)`
|
= note: `-D assign-ops` implied by `-D warnings`
error: assign operation detected
--> assign_ops.rs:14:5
|
14 | i /= 32;
| ^^^^^^^ help: replace it with `i = i / 32`
|
= note: `-D assign-ops` implied by `-D warnings`
error: assign operation detected
--> assign_ops.rs:15:5
|
15 | i /= 32 | 5;
| ^^^^^^^^^^^ help: replace it with `i = i / (32 | 5)`
|
= note: `-D assign-ops` implied by `-D warnings`
error: assign operation detected
--> assign_ops.rs:16:5
|
16 | i /= 32 / 5;
| ^^^^^^^^^^^ help: replace it with `i = i / (32 / 5)`
|
= note: `-D assign-ops` implied by `-D warnings`
error: assign operation detected
--> assign_ops.rs:17:5
|
17 | i %= 42;
| ^^^^^^^ help: replace it with `i = i % 42`
|
= note: `-D assign-ops` implied by `-D warnings`
error: assign operation detected
--> assign_ops.rs:18:5
|
18 | i >>= i;
| ^^^^^^^ help: replace it with `i = i >> i`
|
= note: `-D assign-ops` implied by `-D warnings`
error: assign operation detected
--> assign_ops.rs:19:5
|
19 | i <<= 9 + 6 - 7;
| ^^^^^^^^^^^^^^^ help: replace it with `i = i << (9 + 6 - 7)`
|
= note: `-D assign-ops` implied by `-D warnings`
error: assign operation detected
--> assign_ops.rs:20:5
|
20 | i += 1 << 5;
| ^^^^^^^^^^^ help: replace it with `i = i + (1 << 5)`
|
= note: `-D assign-ops` implied by `-D warnings`
error: manual implementation of an assign operation
--> assign_ops.rs:27:5
@ -115,66 +91,50 @@ error: manual implementation of an assign operation
|
28 | a = 1 + a;
| ^^^^^^^^^ help: replace it with `a += 1`
|
= note: `-D assign-op-pattern` implied by `-D warnings`
error: manual implementation of an assign operation
--> assign_ops.rs:29:5
|
29 | a = a - 1;
| ^^^^^^^^^ help: replace it with `a -= 1`
|
= note: `-D assign-op-pattern` implied by `-D warnings`
error: manual implementation of an assign operation
--> assign_ops.rs:30:5
|
30 | a = a * 99;
| ^^^^^^^^^^ help: replace it with `a *= 99`
|
= note: `-D assign-op-pattern` implied by `-D warnings`
error: manual implementation of an assign operation
--> assign_ops.rs:31:5
|
31 | a = 42 * a;
| ^^^^^^^^^^ help: replace it with `a *= 42`
|
= note: `-D assign-op-pattern` implied by `-D warnings`
error: manual implementation of an assign operation
--> assign_ops.rs:32:5
|
32 | a = a / 2;
| ^^^^^^^^^ help: replace it with `a /= 2`
|
= note: `-D assign-op-pattern` implied by `-D warnings`
error: manual implementation of an assign operation
--> assign_ops.rs:33:5
|
33 | a = a % 5;
| ^^^^^^^^^ help: replace it with `a %= 5`
|
= note: `-D assign-op-pattern` implied by `-D warnings`
error: manual implementation of an assign operation
--> assign_ops.rs:34:5
|
34 | a = a & 1;
| ^^^^^^^^^ help: replace it with `a &= 1`
|
= note: `-D assign-op-pattern` implied by `-D warnings`
error: manual implementation of an assign operation
--> assign_ops.rs:40:5
|
40 | s = s + "bla";
| ^^^^^^^^^^^^^ help: replace it with `s += "bla"`
|
= note: `-D assign-op-pattern` implied by `-D warnings`
error: aborting due to previous error(s)
error: aborting due to 22 previous errors
To learn more, run the command again with --verbose.

View file

@ -11,58 +11,44 @@ error: variable appears on both sides of an assignment operation
|
9 | a += 1 + a;
| ^^^^^^^^^^ help: replace it with `a += 1`
|
= note: `-D misrefactored-assign-op` implied by `-D warnings`
error: variable appears on both sides of an assignment operation
--> assign_ops2.rs:10:5
|
10 | a -= a - 1;
| ^^^^^^^^^^ help: replace it with `a -= 1`
|
= note: `-D misrefactored-assign-op` implied by `-D warnings`
error: variable appears on both sides of an assignment operation
--> assign_ops2.rs:11:5
|
11 | a *= a * 99;
| ^^^^^^^^^^^ help: replace it with `a *= 99`
|
= note: `-D misrefactored-assign-op` implied by `-D warnings`
error: variable appears on both sides of an assignment operation
--> assign_ops2.rs:12:5
|
12 | a *= 42 * a;
| ^^^^^^^^^^^ help: replace it with `a *= 42`
|
= note: `-D misrefactored-assign-op` implied by `-D warnings`
error: variable appears on both sides of an assignment operation
--> assign_ops2.rs:13:5
|
13 | a /= a / 2;
| ^^^^^^^^^^ help: replace it with `a /= 2`
|
= note: `-D misrefactored-assign-op` implied by `-D warnings`
error: variable appears on both sides of an assignment operation
--> assign_ops2.rs:14:5
|
14 | a %= a % 5;
| ^^^^^^^^^^ help: replace it with `a %= 5`
|
= note: `-D misrefactored-assign-op` implied by `-D warnings`
error: variable appears on both sides of an assignment operation
--> assign_ops2.rs:15:5
|
15 | a &= a & 1;
| ^^^^^^^^^^ help: replace it with `a &= 1`
|
= note: `-D misrefactored-assign-op` implied by `-D warnings`
error: aborting due to previous error(s)
error: aborting due to 8 previous errors
To learn more, run the command again with --verbose.

View file

@ -6,6 +6,24 @@ error: you have declared `#[inline(always)]` on `test_attr_lint`. This is usuall
|
= note: `-D inline-always` implied by `-D warnings`
error: you have declared `#[inline(always)]` on `false_positive_expr`. This is usually a bad idea
--> attrs.rs:11:1
|
11 | #[inline(always)]
| ^^^^^^^^^^^^^^^^^
error: you have declared `#[inline(always)]` on `false_positive_stmt`. This is usually a bad idea
--> attrs.rs:16:1
|
16 | #[inline(always)]
| ^^^^^^^^^^^^^^^^^
error: you have declared `#[inline(always)]` on `empty_and_false_positive_stmt`. This is usually a bad idea
--> attrs.rs:21:1
|
21 | #[inline(always)]
| ^^^^^^^^^^^^^^^^^
error: the since field must contain a semver-compliant version
--> attrs.rs:27:14
|
@ -19,10 +37,8 @@ error: the since field must contain a semver-compliant version
|
30 | #[deprecated(since = "1")]
| ^^^^^^^^^^^
|
= note: `-D deprecated-semver` implied by `-D warnings`
error: aborting due to previous error(s)
error: aborting due to 6 previous errors
To learn more, run the command again with --verbose.

View file

@ -11,80 +11,60 @@ error: incompatible bit mask: `_ & 2` can never be equal to `1`
|
15 | x & 2 == 1;
| ^^^^^^^^^^
|
= note: `-D bad-bit-mask` implied by `-D warnings`
error: incompatible bit mask: `_ | 3` can never be equal to `2`
--> bit_masks.rs:19:5
|
19 | x | 3 == 2;
| ^^^^^^^^^^
|
= note: `-D bad-bit-mask` implied by `-D warnings`
error: incompatible bit mask: `_ & 1` will never be higher than `1`
--> bit_masks.rs:21:5
|
21 | x & 1 > 1;
| ^^^^^^^^^
|
= note: `-D bad-bit-mask` implied by `-D warnings`
error: incompatible bit mask: `_ | 2` will always be higher than `1`
--> bit_masks.rs:25:5
|
25 | x | 2 > 1;
| ^^^^^^^^^
|
= note: `-D bad-bit-mask` implied by `-D warnings`
error: incompatible bit mask: `_ & 7` can never be equal to `8`
--> bit_masks.rs:32:5
|
32 | x & THREE_BITS == 8;
| ^^^^^^^^^^^^^^^^^^^
|
= note: `-D bad-bit-mask` implied by `-D warnings`
error: incompatible bit mask: `_ | 7` will never be lower than `7`
--> bit_masks.rs:33:5
|
33 | x | EVEN_MORE_REDIRECTION < 7;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D bad-bit-mask` implied by `-D warnings`
error: &-masking with zero
--> bit_masks.rs:35:5
|
35 | 0 & x == 0;
| ^^^^^^^^^^
|
= note: `-D bad-bit-mask` implied by `-D warnings`
error: incompatible bit mask: `_ | 2` will always be higher than `1`
--> bit_masks.rs:39:5
|
39 | 1 < 2 | x;
| ^^^^^^^^^
|
= note: `-D bad-bit-mask` implied by `-D warnings`
error: incompatible bit mask: `_ | 3` can never be equal to `2`
--> bit_masks.rs:40:5
|
40 | 2 == 3 | x;
| ^^^^^^^^^^
|
= note: `-D bad-bit-mask` implied by `-D warnings`
error: incompatible bit mask: `_ & 2` can never be equal to `1`
--> bit_masks.rs:41:5
|
41 | 1 == x & 2;
| ^^^^^^^^^^
|
= note: `-D bad-bit-mask` implied by `-D warnings`
error: ineffective bit mask: `x | 1` compared to `3`, is the same as x compared directly
--> bit_masks.rs:52:5
@ -99,26 +79,20 @@ error: ineffective bit mask: `x | 1` compared to `4`, is the same as x compared
|
53 | x | 1 < 4;
| ^^^^^^^^^
|
= note: `-D ineffective-bit-mask` implied by `-D warnings`
error: ineffective bit mask: `x | 1` compared to `3`, is the same as x compared directly
--> bit_masks.rs:54:5
|
54 | x | 1 <= 3;
| ^^^^^^^^^^
|
= note: `-D ineffective-bit-mask` implied by `-D warnings`
error: ineffective bit mask: `x | 1` compared to `8`, is the same as x compared directly
--> bit_masks.rs:55:5
|
55 | x | 1 >= 8;
| ^^^^^^^^^^
|
= note: `-D ineffective-bit-mask` implied by `-D warnings`
error: aborting due to previous error(s)
error: aborting due to 15 previous errors
To learn more, run the command again with --verbose.

View file

@ -11,106 +11,80 @@ error: use of a blacklisted/placeholder name `foo`
|
10 | let foo = 42;
| ^^^
|
= note: `-D blacklisted-name` implied by `-D warnings`
error: use of a blacklisted/placeholder name `bar`
--> blacklisted_name.rs:11:9
|
11 | let bar = 42;
| ^^^
|
= note: `-D blacklisted-name` implied by `-D warnings`
error: use of a blacklisted/placeholder name `baz`
--> blacklisted_name.rs:12:9
|
12 | let baz = 42;
| ^^^
|
= note: `-D blacklisted-name` implied by `-D warnings`
error: use of a blacklisted/placeholder name `foo`
--> blacklisted_name.rs:18:10
|
18 | (foo, Some(bar), baz @ Some(_)) => (),
| ^^^
|
= note: `-D blacklisted-name` implied by `-D warnings`
error: use of a blacklisted/placeholder name `bar`
--> blacklisted_name.rs:18:20
|
18 | (foo, Some(bar), baz @ Some(_)) => (),
| ^^^
|
= note: `-D blacklisted-name` implied by `-D warnings`
error: use of a blacklisted/placeholder name `baz`
--> blacklisted_name.rs:18:26
|
18 | (foo, Some(bar), baz @ Some(_)) => (),
| ^^^
|
= note: `-D blacklisted-name` implied by `-D warnings`
error: use of a blacklisted/placeholder name `foo`
--> blacklisted_name.rs:23:19
|
23 | fn issue_1647(mut foo: u8) {
| ^^^
|
= note: `-D blacklisted-name` implied by `-D warnings`
error: use of a blacklisted/placeholder name `bar`
--> blacklisted_name.rs:24:13
|
24 | let mut bar = 0;
| ^^^
|
= note: `-D blacklisted-name` implied by `-D warnings`
error: use of a blacklisted/placeholder name `baz`
--> blacklisted_name.rs:25:21
|
25 | if let Some(mut baz) = Some(42) {}
| ^^^
|
= note: `-D blacklisted-name` implied by `-D warnings`
error: use of a blacklisted/placeholder name `bar`
--> blacklisted_name.rs:29:13
|
29 | let ref bar = 0;
| ^^^
|
= note: `-D blacklisted-name` implied by `-D warnings`
error: use of a blacklisted/placeholder name `baz`
--> blacklisted_name.rs:30:21
|
30 | if let Some(ref baz) = Some(42) {}
| ^^^
|
= note: `-D blacklisted-name` implied by `-D warnings`
error: use of a blacklisted/placeholder name `bar`
--> blacklisted_name.rs:34:17
|
34 | let ref mut bar = 0;
| ^^^
|
= note: `-D blacklisted-name` implied by `-D warnings`
error: use of a blacklisted/placeholder name `baz`
--> blacklisted_name.rs:35:25
|
35 | if let Some(ref mut baz) = Some(42) {}
| ^^^
|
= note: `-D blacklisted-name` implied by `-D warnings`
error: aborting due to previous error(s)
error: aborting due to 14 previous errors
To learn more, run the command again with --verbose.

View file

@ -35,16 +35,12 @@ error: in an 'if' condition, avoid complex blocks or closures with blocks; inste
|
58 | if v == 3 && sky == "blue" && predicate(|x| { let target = 3; x == target }, v) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D block-in-if-condition-stmt` implied by `-D warnings`
error: in an 'if' condition, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a 'let'
--> block_in_if_condition.rs:61:22
|
61 | if predicate(|x| { let target = 3; x == target }, v) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D block-in-if-condition-stmt` implied by `-D warnings`
error: this boolean expression can be simplified
--> block_in_if_condition.rs:67:8
@ -54,7 +50,7 @@ error: this boolean expression can be simplified
|
= note: `-D nonminimal-bool` implied by `-D warnings`
error: aborting due to previous error(s)
error: aborting due to 5 previous errors
To learn more, run the command again with --verbose.

View file

@ -11,26 +11,20 @@ error: equality checks against false can be replaced by a negation
|
8 | if x == false { "yes" } else { "no" };
| ^^^^^^^^^^ help: try simplifying it as shown: `!x`
|
= note: `-D bool-comparison` implied by `-D warnings`
error: equality checks against true are unnecessary
--> bool_comparison.rs:9:8
|
9 | if true == x { "yes" } else { "no" };
| ^^^^^^^^^ help: try simplifying it as shown: `x`
|
= note: `-D bool-comparison` implied by `-D warnings`
error: equality checks against false can be replaced by a negation
--> bool_comparison.rs:10:8
|
10 | if false == x { "yes" } else { "no" };
| ^^^^^^^^^^ help: try simplifying it as shown: `!x`
|
= note: `-D bool-comparison` implied by `-D warnings`
error: aborting due to previous error(s)
error: aborting due to 4 previous errors
To learn more, run the command again with --verbose.

View file

@ -24,16 +24,12 @@ error: this boolean expression can be simplified
|
15 | let _ = !false;
| ^^^^^^ help: try `true`
|
= note: `-D nonminimal-bool` implied by `-D warnings`
error: this boolean expression can be simplified
--> booleans.rs:16:13
|
16 | let _ = !!a;
| ^^^ help: try `a`
|
= note: `-D nonminimal-bool` implied by `-D warnings`
error: this boolean expression contains a logic bug
--> booleans.rs:17:13
@ -41,7 +37,6 @@ error: this boolean expression contains a logic bug
17 | let _ = false && a;
| ^^^^^^^^^^ help: it would look like the following `false`
|
= note: `-D logic-bug` implied by `-D warnings`
help: this expression can be optimized out by applying boolean operations to the outer expression
--> booleans.rs:17:22
|
@ -53,16 +48,12 @@ error: this boolean expression can be simplified
|
18 | let _ = false || a;
| ^^^^^^^^^^ help: try `a`
|
= note: `-D nonminimal-bool` implied by `-D warnings`
error: this boolean expression can be simplified
--> booleans.rs:23:13
|
23 | let _ = !(!a && b);
| ^^^^^^^^^^ help: try `!b || a`
|
= note: `-D nonminimal-bool` implied by `-D warnings`
error: this boolean expression contains a logic bug
--> booleans.rs:33:13
@ -70,7 +61,6 @@ error: this boolean expression contains a logic bug
33 | let _ = a == b && a != b;
| ^^^^^^^^^^^^^^^^ help: it would look like the following `false`
|
= note: `-D logic-bug` implied by `-D warnings`
help: this expression can be optimized out by applying boolean operations to the outer expression
--> booleans.rs:33:13
|
@ -83,7 +73,6 @@ error: this boolean expression can be simplified
34 | let _ = a == b && c == 5 && a == b;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D nonminimal-bool` implied by `-D warnings`
help: try
| let _ = a == b && c == 5;
| let _ = !(c != 5 || a != b);
@ -94,7 +83,6 @@ error: this boolean expression can be simplified
35 | let _ = a == b && c == 5 && b == a;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D nonminimal-bool` implied by `-D warnings`
help: try
| let _ = a == b && c == 5;
| let _ = !(c != 5 || a != b);
@ -105,7 +93,6 @@ error: this boolean expression contains a logic bug
36 | let _ = a < b && a >= b;
| ^^^^^^^^^^^^^^^ help: it would look like the following `false`
|
= note: `-D logic-bug` implied by `-D warnings`
help: this expression can be optimized out by applying boolean operations to the outer expression
--> booleans.rs:36:13
|
@ -118,7 +105,6 @@ error: this boolean expression contains a logic bug
37 | let _ = a > b && a <= b;
| ^^^^^^^^^^^^^^^ help: it would look like the following `false`
|
= note: `-D logic-bug` implied by `-D warnings`
help: this expression can be optimized out by applying boolean operations to the outer expression
--> booleans.rs:37:13
|
@ -131,12 +117,11 @@ error: this boolean expression can be simplified
39 | let _ = a != b || !(a != b || c == d);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D nonminimal-bool` implied by `-D warnings`
help: try
| let _ = c != d || a != b;
| let _ = !(a == b && c == d);
error: aborting due to previous error(s)
error: aborting due to 13 previous errors
To learn more, run the command again with --verbose.

View file

@ -28,7 +28,7 @@ error: you seem to be trying to use `&Box<T>`. Consider using just `&T`
22 | fn test4(a: &Box<bool>);
| ^^^^^^^^^^ help: try `&bool`
error: aborting due to previous error(s)
error: aborting due to 4 previous errors
To learn more, run the command again with --verbose.

View file

@ -7,7 +7,7 @@ error: you seem to be trying to use `Box<Vec<T>>`. Consider using just `Vec<T>`
= note: `-D box-vec` implied by `-D warnings`
= help: `Vec<T>` is already on the heap, `Box<Vec<T>>` makes an extra allocation.
error: aborting due to previous error(s)
error: aborting due to previous error
To learn more, run the command again with --verbose.

View file

@ -11,40 +11,30 @@ error: casting i64 to f32 causes a loss of precision (i64 is 64 bits wide, but f
|
9 | 1i64 as f32;
| ^^^^^^^^^^^
|
= note: `-D cast-precision-loss` implied by `-D warnings`
error: casting i64 to f64 causes a loss of precision (i64 is 64 bits wide, but f64's mantissa is only 52 bits wide)
--> cast.rs:10:5
|
10 | 1i64 as f64;
| ^^^^^^^^^^^
|
= note: `-D cast-precision-loss` implied by `-D warnings`
error: casting u32 to f32 causes a loss of precision (u32 is 32 bits wide, but f32's mantissa is only 23 bits wide)
--> cast.rs:11:5
|
11 | 1u32 as f32;
| ^^^^^^^^^^^
|
= note: `-D cast-precision-loss` implied by `-D warnings`
error: casting u64 to f32 causes a loss of precision (u64 is 64 bits wide, but f32's mantissa is only 23 bits wide)
--> cast.rs:12:5
|
12 | 1u64 as f32;
| ^^^^^^^^^^^
|
= note: `-D cast-precision-loss` implied by `-D warnings`
error: casting u64 to f64 causes a loss of precision (u64 is 64 bits wide, but f64's mantissa is only 52 bits wide)
--> cast.rs:13:5
|
13 | 1u64 as f64;
| ^^^^^^^^^^^
|
= note: `-D cast-precision-loss` implied by `-D warnings`
error: casting f32 to i32 may truncate the value
--> cast.rs:17:5
@ -59,8 +49,6 @@ error: casting f32 to u32 may truncate the value
|
18 | 1f32 as u32;
| ^^^^^^^^^^^
|
= note: `-D cast-possible-truncation` implied by `-D warnings`
error: casting f32 to u32 may lose the sign of the value
--> cast.rs:18:5
@ -75,56 +63,42 @@ error: casting f64 to f32 may truncate the value
|
19 | 1f64 as f32;
| ^^^^^^^^^^^
|
= note: `-D cast-possible-truncation` implied by `-D warnings`
error: casting i32 to i8 may truncate the value
--> cast.rs:20:5
|
20 | 1i32 as i8;
| ^^^^^^^^^^
|
= note: `-D cast-possible-truncation` implied by `-D warnings`
error: casting i32 to u8 may lose the sign of the value
--> cast.rs:21:5
|
21 | 1i32 as u8;
| ^^^^^^^^^^
|
= note: `-D cast-sign-loss` implied by `-D warnings`
error: casting i32 to u8 may truncate the value
--> cast.rs:21:5
|
21 | 1i32 as u8;
| ^^^^^^^^^^
|
= note: `-D cast-possible-truncation` implied by `-D warnings`
error: casting f64 to isize may truncate the value
--> cast.rs:22:5
|
22 | 1f64 as isize;
| ^^^^^^^^^^^^^
|
= note: `-D cast-possible-truncation` implied by `-D warnings`
error: casting f64 to usize may truncate the value
--> cast.rs:23:5
|
23 | 1f64 as usize;
| ^^^^^^^^^^^^^
|
= note: `-D cast-possible-truncation` implied by `-D warnings`
error: casting f64 to usize may lose the sign of the value
--> cast.rs:23:5
|
23 | 1f64 as usize;
| ^^^^^^^^^^^^^
|
= note: `-D cast-sign-loss` implied by `-D warnings`
error: casting u8 to i8 may wrap around the value
--> cast.rs:25:5
@ -139,200 +113,150 @@ error: casting u16 to i16 may wrap around the value
|
26 | 1u16 as i16;
| ^^^^^^^^^^^
|
= note: `-D cast-possible-wrap` implied by `-D warnings`
error: casting u32 to i32 may wrap around the value
--> cast.rs:27:5
|
27 | 1u32 as i32;
| ^^^^^^^^^^^
|
= note: `-D cast-possible-wrap` implied by `-D warnings`
error: casting u64 to i64 may wrap around the value
--> cast.rs:28:5
|
28 | 1u64 as i64;
| ^^^^^^^^^^^
|
= note: `-D cast-possible-wrap` implied by `-D warnings`
error: casting usize to isize may wrap around the value
--> cast.rs:29:5
|
29 | 1usize as isize;
| ^^^^^^^^^^^^^^^
|
= note: `-D cast-possible-wrap` implied by `-D warnings`
error: casting i32 to u32 may lose the sign of the value
--> cast.rs:31:5
|
31 | 1i32 as u32;
| ^^^^^^^^^^^
|
= note: `-D cast-sign-loss` implied by `-D warnings`
error: casting isize to usize may lose the sign of the value
--> cast.rs:32:5
|
32 | 1isize as usize;
| ^^^^^^^^^^^^^^^
|
= note: `-D cast-sign-loss` implied by `-D warnings`
error: casting isize to i8 may truncate the value
--> cast.rs:35:5
|
35 | 1isize as i8;
| ^^^^^^^^^^^^
|
= note: `-D cast-possible-truncation` implied by `-D warnings`
error: casting isize to f64 causes a loss of precision on targets with 64-bit wide pointers (isize is 64 bits wide, but f64's mantissa is only 52 bits wide)
--> cast.rs:36:5
|
36 | 1isize as f64;
| ^^^^^^^^^^^^^
|
= note: `-D cast-precision-loss` implied by `-D warnings`
error: casting usize to f64 causes a loss of precision on targets with 64-bit wide pointers (usize is 64 bits wide, but f64's mantissa is only 52 bits wide)
--> cast.rs:37:5
|
37 | 1usize as f64;
| ^^^^^^^^^^^^^
|
= note: `-D cast-precision-loss` implied by `-D warnings`
error: casting isize to f32 causes a loss of precision (isize is 32 or 64 bits wide, but f32's mantissa is only 23 bits wide)
--> cast.rs:38:5
|
38 | 1isize as f32;
| ^^^^^^^^^^^^^
|
= note: `-D cast-precision-loss` implied by `-D warnings`
error: casting usize to f32 causes a loss of precision (usize is 32 or 64 bits wide, but f32's mantissa is only 23 bits wide)
--> cast.rs:39:5
|
39 | 1usize as f32;
| ^^^^^^^^^^^^^
|
= note: `-D cast-precision-loss` implied by `-D warnings`
error: casting isize to i32 may truncate the value on targets with 64-bit wide pointers
--> cast.rs:40:5
|
40 | 1isize as i32;
| ^^^^^^^^^^^^^
|
= note: `-D cast-possible-truncation` implied by `-D warnings`
error: casting isize to u32 may lose the sign of the value
--> cast.rs:41:5
|
41 | 1isize as u32;
| ^^^^^^^^^^^^^
|
= note: `-D cast-sign-loss` implied by `-D warnings`
error: casting isize to u32 may truncate the value on targets with 64-bit wide pointers
--> cast.rs:41:5
|
41 | 1isize as u32;
| ^^^^^^^^^^^^^
|
= note: `-D cast-possible-truncation` implied by `-D warnings`
error: casting usize to u32 may truncate the value on targets with 64-bit wide pointers
--> cast.rs:42:5
|
42 | 1usize as u32;
| ^^^^^^^^^^^^^
|
= note: `-D cast-possible-truncation` implied by `-D warnings`
error: casting usize to i32 may truncate the value on targets with 64-bit wide pointers
--> cast.rs:43:5
|
43 | 1usize as i32;
| ^^^^^^^^^^^^^
|
= note: `-D cast-possible-truncation` implied by `-D warnings`
error: casting usize to i32 may wrap around the value on targets with 32-bit wide pointers
--> cast.rs:43:5
|
43 | 1usize as i32;
| ^^^^^^^^^^^^^
|
= note: `-D cast-possible-wrap` implied by `-D warnings`
error: casting i64 to isize may truncate the value on targets with 32-bit wide pointers
--> cast.rs:45:5
|
45 | 1i64 as isize;
| ^^^^^^^^^^^^^
|
= note: `-D cast-possible-truncation` implied by `-D warnings`
error: casting i64 to usize may lose the sign of the value
--> cast.rs:46:5
|
46 | 1i64 as usize;
| ^^^^^^^^^^^^^
|
= note: `-D cast-sign-loss` implied by `-D warnings`
error: casting i64 to usize may truncate the value on targets with 32-bit wide pointers
--> cast.rs:46:5
|
46 | 1i64 as usize;
| ^^^^^^^^^^^^^
|
= note: `-D cast-possible-truncation` implied by `-D warnings`
error: casting u64 to isize may truncate the value on targets with 32-bit wide pointers
--> cast.rs:47:5
|
47 | 1u64 as isize;
| ^^^^^^^^^^^^^
|
= note: `-D cast-possible-truncation` implied by `-D warnings`
error: casting u64 to isize may wrap around the value on targets with 64-bit wide pointers
--> cast.rs:47:5
|
47 | 1u64 as isize;
| ^^^^^^^^^^^^^
|
= note: `-D cast-possible-wrap` implied by `-D warnings`
error: casting u64 to usize may truncate the value on targets with 32-bit wide pointers
--> cast.rs:48:5
|
48 | 1u64 as usize;
| ^^^^^^^^^^^^^
|
= note: `-D cast-possible-truncation` implied by `-D warnings`
error: casting u32 to isize may wrap around the value on targets with 32-bit wide pointers
--> cast.rs:49:5
|
49 | 1u32 as isize;
| ^^^^^^^^^^^^^
|
= note: `-D cast-possible-wrap` implied by `-D warnings`
error: casting i32 to usize may lose the sign of the value
--> cast.rs:52:5
|
52 | 1i32 as usize;
| ^^^^^^^^^^^^^
|
= note: `-D cast-sign-loss` implied by `-D warnings`
error: casting to the same type is unnecessary (`i32` -> `i32`)
--> cast.rs:54:5
@ -347,18 +271,14 @@ error: casting to the same type is unnecessary (`f32` -> `f32`)
|
55 | 1f32 as f32;
| ^^^^^^^^^^^
|
= note: `-D unnecessary-cast` implied by `-D warnings`
error: casting to the same type is unnecessary (`bool` -> `bool`)
--> cast.rs:56:5
|
56 | false as bool;
| ^^^^^^^^^^^^^
|
= note: `-D unnecessary-cast` implied by `-D warnings`
error: aborting due to previous error(s)
error: aborting due to 45 previous errors
To learn more, run the command again with --verbose.

View file

@ -8,7 +8,7 @@ error: casting character literal to u8. `char`s are 4 bytes wide in rust, so cas
= help: Consider using a byte literal instead:
b'a'
error: aborting due to previous error(s)
error: aborting due to previous error
To learn more, run the command again with --verbose.

View file

@ -11,90 +11,68 @@ error: doomed comparison with NAN, use `std::{f32,f64}::is_nan()` instead
|
9 | x != std::f32::NAN;
| ^^^^^^^^^^^^^^^^^^
|
= note: `-D cmp-nan` implied by `-D warnings`
error: doomed comparison with NAN, use `std::{f32,f64}::is_nan()` instead
--> cmp_nan.rs:10:5
|
10 | x < std::f32::NAN;
| ^^^^^^^^^^^^^^^^^
|
= note: `-D cmp-nan` implied by `-D warnings`
error: doomed comparison with NAN, use `std::{f32,f64}::is_nan()` instead
--> cmp_nan.rs:11:5
|
11 | x > std::f32::NAN;
| ^^^^^^^^^^^^^^^^^
|
= note: `-D cmp-nan` implied by `-D warnings`
error: doomed comparison with NAN, use `std::{f32,f64}::is_nan()` instead
--> cmp_nan.rs:12:5
|
12 | x <= std::f32::NAN;
| ^^^^^^^^^^^^^^^^^^
|
= note: `-D cmp-nan` implied by `-D warnings`
error: doomed comparison with NAN, use `std::{f32,f64}::is_nan()` instead
--> cmp_nan.rs:13:5
|
13 | x >= std::f32::NAN;
| ^^^^^^^^^^^^^^^^^^
|
= note: `-D cmp-nan` implied by `-D warnings`
error: doomed comparison with NAN, use `std::{f32,f64}::is_nan()` instead
--> cmp_nan.rs:16:5
|
16 | y == std::f64::NAN;
| ^^^^^^^^^^^^^^^^^^
|
= note: `-D cmp-nan` implied by `-D warnings`
error: doomed comparison with NAN, use `std::{f32,f64}::is_nan()` instead
--> cmp_nan.rs:17:5
|
17 | y != std::f64::NAN;
| ^^^^^^^^^^^^^^^^^^
|
= note: `-D cmp-nan` implied by `-D warnings`
error: doomed comparison with NAN, use `std::{f32,f64}::is_nan()` instead
--> cmp_nan.rs:18:5
|
18 | y < std::f64::NAN;
| ^^^^^^^^^^^^^^^^^
|
= note: `-D cmp-nan` implied by `-D warnings`
error: doomed comparison with NAN, use `std::{f32,f64}::is_nan()` instead
--> cmp_nan.rs:19:5
|
19 | y > std::f64::NAN;
| ^^^^^^^^^^^^^^^^^
|
= note: `-D cmp-nan` implied by `-D warnings`
error: doomed comparison with NAN, use `std::{f32,f64}::is_nan()` instead
--> cmp_nan.rs:20:5
|
20 | y <= std::f64::NAN;
| ^^^^^^^^^^^^^^^^^^
|
= note: `-D cmp-nan` implied by `-D warnings`
error: doomed comparison with NAN, use `std::{f32,f64}::is_nan()` instead
--> cmp_nan.rs:21:5
|
21 | y >= std::f64::NAN;
| ^^^^^^^^^^^^^^^^^^
|
= note: `-D cmp-nan` implied by `-D warnings`
error: aborting due to previous error(s)
error: aborting due to 12 previous errors
To learn more, run the command again with --verbose.

View file

@ -11,10 +11,8 @@ error: Comparing with null is better expressed by the .is_null() method
|
16 | if m == ptr::null_mut() {
| ^^^^^^^^^^^^^^^^^^^^
|
= note: `-D cmp-null` implied by `-D warnings`
error: aborting due to previous error(s)
error: aborting due to 2 previous errors
To learn more, run the command again with --verbose.

View file

@ -11,42 +11,32 @@ error: this creates an owned instance just for comparison
|
10 | "foo".to_string() != x;
| ^^^^^^^^^^^^^^^^^ help: try `"foo"`
|
= note: `-D cmp-owned` implied by `-D warnings`
error: this creates an owned instance just for comparison
--> cmp_owned.rs:17:10
|
17 | x != "foo".to_owned();
| ^^^^^^^^^^^^^^^^ help: try `"foo"`
|
= note: `-D cmp-owned` implied by `-D warnings`
error: this creates an owned instance just for comparison
--> cmp_owned.rs:19:10
|
19 | x != String::from("foo");
| ^^^^^^^^^^^^^^^^^^^ help: try `"foo"`
|
= note: `-D cmp-owned` implied by `-D warnings`
error: this creates an owned instance just for comparison
--> cmp_owned.rs:23:5
|
23 | Foo.to_owned() == Foo;
| ^^^^^^^^^^^^^^ help: try `Foo`
|
= note: `-D cmp-owned` implied by `-D warnings`
error: this creates an owned instance just for comparison
--> cmp_owned.rs:30:9
|
30 | self.to_owned() == *other
| ^^^^^^^^^^^^^^^ try calling implementing the comparison without allocating
|
= note: `-D cmp-owned` implied by `-D warnings`
error: aborting due to previous error(s)
error: aborting due to 6 previous errors
To learn more, run the command again with --verbose.

View file

@ -24,7 +24,6 @@ error: this if statement can be collapsed
18 | | }
| |_____^
|
= note: `-D collapsible-if` implied by `-D warnings`
help: try
| if (x == "hello" || x == "world") && (y == "world" || y == "hello") {
| println!("Hello world!");
@ -40,7 +39,6 @@ error: this if statement can be collapsed
24 | | }
| |_____^
|
= note: `-D collapsible-if` implied by `-D warnings`
help: try
| if x == "hello" && x == "world" && (y == "world" || y == "hello") {
| println!("Hello world!");
@ -56,7 +54,6 @@ error: this if statement can be collapsed
30 | | }
| |_____^
|
= note: `-D collapsible-if` implied by `-D warnings`
help: try
| if (x == "hello" || x == "world") && y == "world" && y == "hello" {
| println!("Hello world!");
@ -72,7 +69,6 @@ error: this if statement can be collapsed
36 | | }
| |_____^
|
= note: `-D collapsible-if` implied by `-D warnings`
help: try
| if x == "hello" && x == "world" && y == "world" && y == "hello" {
| println!("Hello world!");
@ -88,7 +84,6 @@ error: this if statement can be collapsed
42 | | }
| |_____^
|
= note: `-D collapsible-if` implied by `-D warnings`
help: try
| if 42 == 1337 && 'a' != 'A' {
| println!("world!")
@ -105,7 +100,6 @@ error: this `else { if .. }` block can be collapsed
51 | | }
| |_____^
|
= note: `-D collapsible-if` implied by `-D warnings`
help: try
| } else if y == "world" {
| println!("world!")
@ -122,7 +116,6 @@ error: this `else { if .. }` block can be collapsed
59 | | }
| |_____^
|
= note: `-D collapsible-if` implied by `-D warnings`
help: try
| } else if let Some(42) = Some(42) {
| println!("world!")
@ -141,7 +134,6 @@ error: this `else { if .. }` block can be collapsed
70 | | }
| |_____^
|
= note: `-D collapsible-if` implied by `-D warnings`
help: try
| } else if y == "world" {
| println!("world")
@ -163,7 +155,6 @@ error: this `else { if .. }` block can be collapsed
81 | | }
| |_____^
|
= note: `-D collapsible-if` implied by `-D warnings`
help: try
| } else if let Some(42) = Some(42) {
| println!("world")
@ -185,7 +176,6 @@ error: this `else { if .. }` block can be collapsed
92 | | }
| |_____^
|
= note: `-D collapsible-if` implied by `-D warnings`
help: try
| } else if let Some(42) = Some(42) {
| println!("world")
@ -207,7 +197,6 @@ error: this `else { if .. }` block can be collapsed
103 | | }
| |_____^
|
= note: `-D collapsible-if` implied by `-D warnings`
help: try
| } else if x == "hello" {
| println!("world")
@ -229,7 +218,6 @@ error: this `else { if .. }` block can be collapsed
114 | | }
| |_____^
|
= note: `-D collapsible-if` implied by `-D warnings`
help: try
| } else if let Some(42) = Some(42) {
| println!("world")
@ -238,7 +226,7 @@ help: try
| println!("!")
| }
error: aborting due to previous error(s)
error: aborting due to 13 previous errors
To learn more, run the command again with --verbose.

View file

@ -11,114 +11,86 @@ error: very complex type used. Consider factoring parts into `type` definitions
|
10 | static ST: (u32, (u32, (u32, (u32, u32)))) = (0, (0, (0, (0, 0))));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D type-complexity` implied by `-D warnings`
error: very complex type used. Consider factoring parts into `type` definitions
--> complex_types.rs:13:8
|
13 | f: Vec<Vec<Box<(u32, u32, u32, u32)>>>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D type-complexity` implied by `-D warnings`
error: very complex type used. Consider factoring parts into `type` definitions
--> complex_types.rs:16:11
|
16 | struct TS(Vec<Vec<Box<(u32, u32, u32, u32)>>>);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D type-complexity` implied by `-D warnings`
error: very complex type used. Consider factoring parts into `type` definitions
--> complex_types.rs:19:11
|
19 | Tuple(Vec<Vec<Box<(u32, u32, u32, u32)>>>),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D type-complexity` implied by `-D warnings`
error: very complex type used. Consider factoring parts into `type` definitions
--> complex_types.rs:20:17
|
20 | Struct { f: Vec<Vec<Box<(u32, u32, u32, u32)>>> },
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D type-complexity` implied by `-D warnings`
error: very complex type used. Consider factoring parts into `type` definitions
--> complex_types.rs:24:14
|
24 | const A: (u32, (u32, (u32, (u32, u32)))) = (0, (0, (0, (0, 0))));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D type-complexity` implied by `-D warnings`
error: very complex type used. Consider factoring parts into `type` definitions
--> complex_types.rs:25:30
|
25 | fn impl_method(&self, p: Vec<Vec<Box<(u32, u32, u32, u32)>>>) { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D type-complexity` implied by `-D warnings`
error: very complex type used. Consider factoring parts into `type` definitions
--> complex_types.rs:29:14
|
29 | const A: Vec<Vec<Box<(u32, u32, u32, u32)>>>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D type-complexity` implied by `-D warnings`
error: very complex type used. Consider factoring parts into `type` definitions
--> complex_types.rs:30:14
|
30 | type B = Vec<Vec<Box<(u32, u32, u32, u32)>>>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D type-complexity` implied by `-D warnings`
error: very complex type used. Consider factoring parts into `type` definitions
--> complex_types.rs:31:25
|
31 | fn method(&self, p: Vec<Vec<Box<(u32, u32, u32, u32)>>>);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D type-complexity` implied by `-D warnings`
error: very complex type used. Consider factoring parts into `type` definitions
--> complex_types.rs:32:29
|
32 | fn def_method(&self, p: Vec<Vec<Box<(u32, u32, u32, u32)>>>) { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D type-complexity` implied by `-D warnings`
error: very complex type used. Consider factoring parts into `type` definitions
--> complex_types.rs:35:15
|
35 | fn test1() -> Vec<Vec<Box<(u32, u32, u32, u32)>>> { vec![] }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D type-complexity` implied by `-D warnings`
error: very complex type used. Consider factoring parts into `type` definitions
--> complex_types.rs:37:14
|
37 | fn test2(_x: Vec<Vec<Box<(u32, u32, u32, u32)>>>) { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D type-complexity` implied by `-D warnings`
error: very complex type used. Consider factoring parts into `type` definitions
--> complex_types.rs:40:13
|
40 | let _y: Vec<Vec<Box<(u32, u32, u32, u32)>>> = vec![];
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D type-complexity` implied by `-D warnings`
error: aborting due to previous error(s)
error: aborting due to 15 previous errors
To learn more, run the command again with --verbose.

View file

@ -26,7 +26,6 @@ error: This else block is redundant.
133 | | }
| |_____________^
|
= note: `-D needless-continue` implied by `-D warnings`
= help: Consider dropping the else clause and merging the code that follows (in the loop) with the if block, like so:
if true {
break;
@ -34,7 +33,7 @@ error: This else block is redundant.
}
error: aborting due to previous error(s)
error: aborting due to 2 previous errors
To learn more, run the command again with --verbose.

View file

@ -25,7 +25,6 @@ error: the function has a cyclomatic complexity of 7
111 | | }
| |_^
|
= note: `-D cyclomatic-complexity` implied by `-D warnings`
= help: you could split it up into multiple smaller functions
error: the function has a cyclomatic complexity of 1
@ -36,7 +35,6 @@ error: the function has a cyclomatic complexity of 1
140 | | }
| |_^
|
= note: `-D cyclomatic-complexity` implied by `-D warnings`
= help: you could split it up into multiple smaller functions
error: the function has a cyclomatic complexity of 1
@ -47,7 +45,6 @@ error: the function has a cyclomatic complexity of 1
145 | | }
| |_^
|
= note: `-D cyclomatic-complexity` implied by `-D warnings`
= help: you could split it up into multiple smaller functions
error: the function has a cyclomatic complexity of 2
@ -62,7 +59,6 @@ error: the function has a cyclomatic complexity of 2
163 | | }
| |_^
|
= note: `-D cyclomatic-complexity` implied by `-D warnings`
= help: you could split it up into multiple smaller functions
error: the function has a cyclomatic complexity of 2
@ -78,7 +74,6 @@ error: the function has a cyclomatic complexity of 2
157 | | };
| |_____^
|
= note: `-D cyclomatic-complexity` implied by `-D warnings`
= help: you could split it up into multiple smaller functions
error: the function has a cyclomatic complexity of 2
@ -92,7 +87,6 @@ error: the function has a cyclomatic complexity of 2
171 | | }
| |_^
|
= note: `-D cyclomatic-complexity` implied by `-D warnings`
= help: you could split it up into multiple smaller functions
error: the function has a cyclomatic complexity of 2
@ -107,7 +101,6 @@ error: the function has a cyclomatic complexity of 2
192 | | }
| |_^
|
= note: `-D cyclomatic-complexity` implied by `-D warnings`
= help: you could split it up into multiple smaller functions
error: the function has a cyclomatic complexity of 3
@ -122,7 +115,6 @@ error: the function has a cyclomatic complexity of 3
208 | | }
| |_^
|
= note: `-D cyclomatic-complexity` implied by `-D warnings`
= help: you could split it up into multiple smaller functions
error: the function has a cyclomatic complexity of 2
@ -137,7 +129,6 @@ error: the function has a cyclomatic complexity of 2
218 | | }
| |_^
|
= note: `-D cyclomatic-complexity` implied by `-D warnings`
= help: you could split it up into multiple smaller functions
error: the function has a cyclomatic complexity of 3
@ -152,7 +143,6 @@ error: the function has a cyclomatic complexity of 3
234 | | }
| |_^
|
= note: `-D cyclomatic-complexity` implied by `-D warnings`
= help: you could split it up into multiple smaller functions
error: the function has a cyclomatic complexity of 2
@ -167,7 +157,6 @@ error: the function has a cyclomatic complexity of 2
244 | | }
| |_^
|
= note: `-D cyclomatic-complexity` implied by `-D warnings`
= help: you could split it up into multiple smaller functions
error: the function has a cyclomatic complexity of 3
@ -182,7 +171,6 @@ error: the function has a cyclomatic complexity of 3
260 | | }
| |_^
|
= note: `-D cyclomatic-complexity` implied by `-D warnings`
= help: you could split it up into multiple smaller functions
error: the function has a cyclomatic complexity of 2
@ -197,7 +185,6 @@ error: the function has a cyclomatic complexity of 2
270 | | }
| |_^
|
= note: `-D cyclomatic-complexity` implied by `-D warnings`
= help: you could split it up into multiple smaller functions
error: the function has a cyclomatic complexity of 4
@ -212,7 +199,6 @@ error: the function has a cyclomatic complexity of 4
300 | | }
| |_^
|
= note: `-D cyclomatic-complexity` implied by `-D warnings`
= help: you could split it up into multiple smaller functions
error: the function has a cyclomatic complexity of 1
@ -226,7 +212,6 @@ error: the function has a cyclomatic complexity of 1
310 | | }
| |_^
|
= note: `-D cyclomatic-complexity` implied by `-D warnings`
= help: you could split it up into multiple smaller functions
error: the function has a cyclomatic complexity of 1
@ -240,7 +225,6 @@ error: the function has a cyclomatic complexity of 1
324 | | }
| |_^
|
= note: `-D cyclomatic-complexity` implied by `-D warnings`
= help: you could split it up into multiple smaller functions
error: the function has a cyclomatic complexity of 1
@ -255,7 +239,6 @@ error: the function has a cyclomatic complexity of 1
340 | | }
| |_^
|
= note: `-D cyclomatic-complexity` implied by `-D warnings`
= help: you could split it up into multiple smaller functions
error: the function has a cyclomatic complexity of 1
@ -270,7 +253,6 @@ error: the function has a cyclomatic complexity of 1
353 | | }
| |_^
|
= note: `-D cyclomatic-complexity` implied by `-D warnings`
= help: you could split it up into multiple smaller functions
error: the function has a cyclomatic complexity of 8
@ -285,10 +267,9 @@ error: the function has a cyclomatic complexity of 8
373 | | }
| |_^
|
= note: `-D cyclomatic-complexity` implied by `-D warnings`
= help: you could split it up into multiple smaller functions
error: aborting due to previous error(s)
error: aborting due to 20 previous errors
To learn more, run the command again with --verbose.

View file

@ -13,7 +13,7 @@ error: the function has a cyclomatic complexity of 3
= note: `-D cyclomatic-complexity` implied by `-D warnings`
= help: you could split it up into multiple smaller functions
error: aborting due to previous error(s)
error: aborting due to previous error
To learn more, run the command again with --verbose.

View file

@ -19,7 +19,6 @@ error: you are deriving `Hash` but have implemented `PartialEq` explicitly
24 | #[derive(Hash)]
| ^^^^
|
= note: `-D derive-hash-xor-eq` implied by `-D warnings`
note: `PartialEq` implemented here
--> derive.rs:27:1
|
@ -36,7 +35,6 @@ error: you are implementing `Hash` explicitly but have derived `PartialEq`
36 | | }
| |_^
|
= note: `-D derive-hash-xor-eq` implied by `-D warnings`
note: `PartialEq` implemented here
--> derive.rs:31:10
|
@ -68,7 +66,6 @@ error: you are implementing `Clone` explicitly on a `Copy` type
67 | | }
| |_^
|
= note: `-D expl-impl-clone-on-copy` implied by `-D warnings`
note: consider deriving `Clone` or removing `Copy`
--> derive.rs:65:1
|
@ -77,7 +74,7 @@ note: consider deriving `Clone` or removing `Copy`
67 | | }
| |_^
error: aborting due to previous error(s)
error: aborting due to 5 previous errors
To learn more, run the command again with --verbose.

View file

@ -11,42 +11,32 @@ error: sub-expression diverges
|
19 | b || A.foo();
| ^^^^^^^
|
= note: `-D diverging-sub-expression` implied by `-D warnings`
error: sub-expression diverges
--> diverging_sub_expression.rs:28:26
|
28 | 6 => true || return,
| ^^^^^^
|
= note: `-D diverging-sub-expression` implied by `-D warnings`
error: sub-expression diverges
--> diverging_sub_expression.rs:29:26
|
29 | 7 => true || continue,
| ^^^^^^^^
|
= note: `-D diverging-sub-expression` implied by `-D warnings`
error: sub-expression diverges
--> diverging_sub_expression.rs:32:26
|
32 | 3 => true || diverge(),
| ^^^^^^^^^
|
= note: `-D diverging-sub-expression` implied by `-D warnings`
error: sub-expression diverges
--> diverging_sub_expression.rs:37:26
|
37 | _ => true || break,
| ^^^^^
|
= note: `-D diverging-sub-expression` implied by `-D warnings`
error: aborting due to previous error(s)
error: aborting due to 6 previous errors
To learn more, run the command again with --verbose.

View file

@ -13,7 +13,6 @@ error: I see you're using a LinkedList! Perhaps you meant some other data struct
14 | fn foo(LinkedList<u8>);
| ^^^^^^^^^^^^^^
|
= note: `-D linkedlist` implied by `-D warnings`
= help: a VecDeque might work
error: I see you're using a LinkedList! Perhaps you meant some other data structure?
@ -22,7 +21,6 @@ error: I see you're using a LinkedList! Perhaps you meant some other data struct
15 | const BAR : Option<LinkedList<u8>>;
| ^^^^^^^^^^^^^^
|
= note: `-D linkedlist` implied by `-D warnings`
= help: a VecDeque might work
error: I see you're using a LinkedList! Perhaps you meant some other data structure?
@ -31,7 +29,6 @@ error: I see you're using a LinkedList! Perhaps you meant some other data struct
26 | fn foo(_: LinkedList<u8>) {}
| ^^^^^^^^^^^^^^
|
= note: `-D linkedlist` implied by `-D warnings`
= help: a VecDeque might work
error: I see you're using a LinkedList! Perhaps you meant some other data structure?
@ -40,7 +37,6 @@ error: I see you're using a LinkedList! Perhaps you meant some other data struct
29 | pub fn test(my_favourite_linked_list: LinkedList<u8>) {
| ^^^^^^^^^^^^^^
|
= note: `-D linkedlist` implied by `-D warnings`
= help: a VecDeque might work
error: I see you're using a LinkedList! Perhaps you meant some other data structure?
@ -49,10 +45,9 @@ error: I see you're using a LinkedList! Perhaps you meant some other data struct
33 | pub fn test_ret() -> Option<LinkedList<u8>> {
| ^^^^^^^^^^^^^^
|
= note: `-D linkedlist` implied by `-D warnings`
= help: a VecDeque might work
error: aborting due to previous error(s)
error: aborting due to 6 previous errors
To learn more, run the command again with --verbose.

View file

@ -11,202 +11,152 @@ error: you should put `foo_bar` between ticks in the documentation
|
8 | /// The foo_bar function does _nothing_. See also foo::bar. (note the dot there)
| ^^^^^^^
|
= note: `-D doc-markdown` implied by `-D warnings`
error: you should put `foo::bar` between ticks in the documentation
--> doc.rs:8:51
|
8 | /// The foo_bar function does _nothing_. See also foo::bar. (note the dot there)
| ^^^^^^^^
|
= note: `-D doc-markdown` implied by `-D warnings`
error: you should put `Foo::some_fun` between ticks in the documentation
--> doc.rs:9:84
|
9 | /// Markdown is _weird_. I mean _really weird_. This \_ is ok. So is `_`. But not Foo::some_fun
| ^^^^^^^^^^^^^
|
= note: `-D doc-markdown` implied by `-D warnings`
error: you should put `a::global:path` between ticks in the documentation
--> doc.rs:11:15
|
11 | /// Here be ::a::global:path.
| ^^^^^^^^^^^^^^
|
= note: `-D doc-markdown` implied by `-D warnings`
error: you should put `NotInCodeBlock` between ticks in the documentation
--> doc.rs:12:22
|
12 | /// That's not code ~NotInCodeBlock~.
| ^^^^^^^^^^^^^^
|
= note: `-D doc-markdown` implied by `-D warnings`
error: you should put `be_sure_we_got_to_the_end_of_it` between ticks in the documentation
--> doc.rs:13:5
|
13 | /// be_sure_we_got_to_the_end_of_it
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D doc-markdown` implied by `-D warnings`
error: you should put `be_sure_we_got_to_the_end_of_it` between ticks in the documentation
--> doc.rs:27:5
|
27 | /// be_sure_we_got_to_the_end_of_it
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D doc-markdown` implied by `-D warnings`
error: you should put `be_sure_we_got_to_the_end_of_it` between ticks in the documentation
--> doc.rs:34:5
|
34 | /// be_sure_we_got_to_the_end_of_it
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D doc-markdown` implied by `-D warnings`
error: you should put `be_sure_we_got_to_the_end_of_it` between ticks in the documentation
--> doc.rs:48:5
|
48 | /// be_sure_we_got_to_the_end_of_it
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D doc-markdown` implied by `-D warnings`
error: you should put `link_with_underscores` between ticks in the documentation
--> doc.rs:52:22
|
52 | /// This test has [a link_with_underscores][chunked-example] inside it. See #823.
| ^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D doc-markdown` implied by `-D warnings`
error: you should put `inline_link2` between ticks in the documentation
--> doc.rs:55:21
|
55 | /// It can also be [inline_link2].
| ^^^^^^^^^^^^
|
= note: `-D doc-markdown` implied by `-D warnings`
error: you should put `be_sure_we_got_to_the_end_of_it` between ticks in the documentation
--> doc.rs:65:5
|
65 | /// be_sure_we_got_to_the_end_of_it
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D doc-markdown` implied by `-D warnings`
error: you should put `CamelCaseThing` between ticks in the documentation
--> doc.rs:73:8
|
73 | /// ## CamelCaseThing
| ^^^^^^^^^^^^^^
|
= note: `-D doc-markdown` implied by `-D warnings`
error: you should put `CamelCaseThing` between ticks in the documentation
--> doc.rs:76:7
|
76 | /// # CamelCaseThing
| ^^^^^^^^^^^^^^
|
= note: `-D doc-markdown` implied by `-D warnings`
error: you should put `CamelCaseThing` between ticks in the documentation
--> doc.rs:78:22
|
78 | /// Not a title #897 CamelCaseThing
| ^^^^^^^^^^^^^^
|
= note: `-D doc-markdown` implied by `-D warnings`
error: you should put `be_sure_we_got_to_the_end_of_it` between ticks in the documentation
--> doc.rs:79:5
|
79 | /// be_sure_we_got_to_the_end_of_it
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D doc-markdown` implied by `-D warnings`
error: you should put `be_sure_we_got_to_the_end_of_it` between ticks in the documentation
--> doc.rs:86:5
|
86 | /// be_sure_we_got_to_the_end_of_it
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D doc-markdown` implied by `-D warnings`
error: you should put `be_sure_we_got_to_the_end_of_it` between ticks in the documentation
--> doc.rs:99:5
|
99 | /// be_sure_we_got_to_the_end_of_it
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D doc-markdown` implied by `-D warnings`
error: you should put `FooBar` between ticks in the documentation
--> doc.rs:110:42
|
110 | /** E.g. serialization of an empty list: FooBar
| ^^^^^^
|
= note: `-D doc-markdown` implied by `-D warnings`
error: you should put `BarQuz` between ticks in the documentation
--> doc.rs:115:5
|
115 | And BarQuz too.
| ^^^^^^
|
= note: `-D doc-markdown` implied by `-D warnings`
error: you should put `be_sure_we_got_to_the_end_of_it` between ticks in the documentation
--> doc.rs:116:1
|
116 | be_sure_we_got_to_the_end_of_it
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D doc-markdown` implied by `-D warnings`
error: you should put `FooBar` between ticks in the documentation
--> doc.rs:121:42
|
121 | /** E.g. serialization of an empty list: FooBar
| ^^^^^^
|
= note: `-D doc-markdown` implied by `-D warnings`
error: you should put `BarQuz` between ticks in the documentation
--> doc.rs:126:5
|
126 | And BarQuz too.
| ^^^^^^
|
= note: `-D doc-markdown` implied by `-D warnings`
error: you should put `be_sure_we_got_to_the_end_of_it` between ticks in the documentation
--> doc.rs:127:1
|
127 | be_sure_we_got_to_the_end_of_it
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D doc-markdown` implied by `-D warnings`
error: you should put `be_sure_we_got_to_the_end_of_it` between ticks in the documentation
--> doc.rs:138:5
|
138 | /// be_sure_we_got_to_the_end_of_it
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D doc-markdown` implied by `-D warnings`
error: aborting due to previous error(s)
error: aborting due to 26 previous errors
To learn more, run the command again with --verbose.

View file

@ -6,7 +6,7 @@ error: `--x` could be misinterpreted as pre-decrement by C programmers, is usual
|
= note: `-D double-neg` implied by `-D warnings`
error: aborting due to previous error(s)
error: aborting due to previous error
To learn more, run the command again with --verbose.

View file

@ -11,34 +11,26 @@ error: Consider removing unnecessary double parentheses
|
20 | dummy_fn((0));
| ^^^
|
= note: `-D double-parens` implied by `-D warnings`
error: Consider removing unnecessary double parentheses
--> double_parens.rs:24:20
|
24 | x.dummy_method((0));
| ^^^
|
= note: `-D double-parens` implied by `-D warnings`
error: Consider removing unnecessary double parentheses
--> double_parens.rs:28:5
|
28 | ((1, 2))
| ^^^^^^^^
|
= note: `-D double-parens` implied by `-D warnings`
error: Consider removing unnecessary double parentheses
--> double_parens.rs:32:5
|
32 | (())
| ^^^^
|
= note: `-D double-parens` implied by `-D warnings`
error: aborting due to previous error(s)
error: aborting due to 5 previous errors
To learn more, run the command again with --verbose.

View file

@ -17,7 +17,6 @@ error: calls to `std::mem::drop` with a value that implements Copy. Dropping a c
34 | drop(s2);
| ^^^^^^^^
|
= note: `-D drop-copy` implied by `-D warnings`
note: argument has type SomeStruct
--> drop_forget_copy.rs:34:10
|
@ -30,7 +29,6 @@ error: calls to `std::mem::drop` with a value that implements Copy. Dropping a c
36 | drop(s4);
| ^^^^^^^^
|
= note: `-D drop-copy` implied by `-D warnings`
note: argument has type SomeStruct
--> drop_forget_copy.rs:36:10
|
@ -56,7 +54,6 @@ error: calls to `std::mem::forget` with a value that implements Copy. Forgetting
40 | forget(s2);
| ^^^^^^^^^^
|
= note: `-D forget-copy` implied by `-D warnings`
note: argument has type SomeStruct
--> drop_forget_copy.rs:40:12
|
@ -69,14 +66,13 @@ error: calls to `std::mem::forget` with a value that implements Copy. Forgetting
42 | forget(s4);
| ^^^^^^^^^^
|
= note: `-D forget-copy` implied by `-D warnings`
note: argument has type SomeStruct
--> drop_forget_copy.rs:42:12
|
42 | forget(s4);
| ^^
error: aborting due to previous error(s)
error: aborting due to 6 previous errors
To learn more, run the command again with --verbose.

View file

@ -30,7 +30,6 @@ error: calls to `std::mem::drop` with a reference instead of an owned value. Dro
16 | drop(&owned1);
| ^^^^^^^^^^^^^
|
= note: `-D drop-ref` implied by `-D warnings`
note: argument has type &SomeStruct
--> drop_forget_ref.rs:16:10
|
@ -43,7 +42,6 @@ error: calls to `std::mem::drop` with a reference instead of an owned value. Dro
17 | drop(&&owned1);
| ^^^^^^^^^^^^^^
|
= note: `-D drop-ref` implied by `-D warnings`
note: argument has type &&SomeStruct
--> drop_forget_ref.rs:17:10
|
@ -56,7 +54,6 @@ error: calls to `std::mem::drop` with a reference instead of an owned value. Dro
18 | drop(&mut owned1);
| ^^^^^^^^^^^^^^^^^
|
= note: `-D drop-ref` implied by `-D warnings`
note: argument has type &mut SomeStruct
--> drop_forget_ref.rs:18:10
|
@ -69,7 +66,6 @@ error: calls to `std::mem::forget` with a reference instead of an owned value. F
21 | forget(&owned2);
| ^^^^^^^^^^^^^^^
|
= note: `-D forget-ref` implied by `-D warnings`
note: argument has type &SomeStruct
--> drop_forget_ref.rs:21:12
|
@ -82,7 +78,6 @@ error: calls to `std::mem::forget` with a reference instead of an owned value. F
22 | forget(&&owned2);
| ^^^^^^^^^^^^^^^^
|
= note: `-D forget-ref` implied by `-D warnings`
note: argument has type &&SomeStruct
--> drop_forget_ref.rs:22:12
|
@ -95,7 +90,6 @@ error: calls to `std::mem::forget` with a reference instead of an owned value. F
23 | forget(&mut owned2);
| ^^^^^^^^^^^^^^^^^^^
|
= note: `-D forget-ref` implied by `-D warnings`
note: argument has type &mut SomeStruct
--> drop_forget_ref.rs:23:12
|
@ -108,7 +102,6 @@ error: calls to `std::mem::drop` with a reference instead of an owned value. Dro
27 | drop(reference1);
| ^^^^^^^^^^^^^^^^
|
= note: `-D drop-ref` implied by `-D warnings`
note: argument has type &SomeStruct
--> drop_forget_ref.rs:27:10
|
@ -121,7 +114,6 @@ error: calls to `std::mem::forget` with a reference instead of an owned value. F
28 | forget(&*reference1);
| ^^^^^^^^^^^^^^^^^^^^
|
= note: `-D forget-ref` implied by `-D warnings`
note: argument has type &SomeStruct
--> drop_forget_ref.rs:28:12
|
@ -134,7 +126,6 @@ error: calls to `std::mem::drop` with a reference instead of an owned value. Dro
31 | drop(reference2);
| ^^^^^^^^^^^^^^^^
|
= note: `-D drop-ref` implied by `-D warnings`
note: argument has type &mut SomeStruct
--> drop_forget_ref.rs:31:10
|
@ -147,7 +138,6 @@ error: calls to `std::mem::forget` with a reference instead of an owned value. F
33 | forget(reference3);
| ^^^^^^^^^^^^^^^^^^
|
= note: `-D forget-ref` implied by `-D warnings`
note: argument has type &mut SomeStruct
--> drop_forget_ref.rs:33:12
|
@ -160,7 +150,6 @@ error: calls to `std::mem::drop` with a reference instead of an owned value. Dro
36 | drop(reference4);
| ^^^^^^^^^^^^^^^^
|
= note: `-D drop-ref` implied by `-D warnings`
note: argument has type &SomeStruct
--> drop_forget_ref.rs:36:10
|
@ -173,7 +162,6 @@ error: calls to `std::mem::forget` with a reference instead of an owned value. F
37 | forget(reference4);
| ^^^^^^^^^^^^^^^^^^
|
= note: `-D forget-ref` implied by `-D warnings`
note: argument has type &SomeStruct
--> drop_forget_ref.rs:37:12
|
@ -186,7 +174,6 @@ error: calls to `std::mem::drop` with a reference instead of an owned value. Dro
42 | drop(&val);
| ^^^^^^^^^^
|
= note: `-D drop-ref` implied by `-D warnings`
note: argument has type &T
--> drop_forget_ref.rs:42:10
|
@ -199,7 +186,6 @@ error: calls to `std::mem::forget` with a reference instead of an owned value. F
48 | forget(&val);
| ^^^^^^^^^^^^
|
= note: `-D forget-ref` implied by `-D warnings`
note: argument has type &T
--> drop_forget_ref.rs:48:12
|
@ -212,7 +198,6 @@ error: calls to `std::mem::drop` with a reference instead of an owned value. Dro
56 | std::mem::drop(&SomeStruct);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D drop-ref` implied by `-D warnings`
note: argument has type &SomeStruct
--> drop_forget_ref.rs:56:20
|
@ -225,14 +210,13 @@ error: calls to `std::mem::forget` with a reference instead of an owned value. F
59 | std::mem::forget(&SomeStruct);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D forget-ref` implied by `-D warnings`
note: argument has type &SomeStruct
--> drop_forget_ref.rs:59:22
|
59 | std::mem::forget(&SomeStruct);
| ^^^^^^^^^^^
error: aborting due to previous error(s)
error: aborting due to 18 previous errors
To learn more, run the command again with --verbose.

View file

@ -6,7 +6,7 @@ error: `darth` already exists, having another argument having almost the same na
|
= note: `-D duplicate-underscore-argument` implied by `-D warnings`
error: aborting due to previous error(s)
error: aborting due to previous error
To learn more, run the command again with --verbose.

View file

@ -11,7 +11,7 @@ help: consider using the uninhabited type `!` or a wrapper around it
7 | enum Empty {}
| ^^^^^^^^^^^^^
error: aborting due to previous error(s)
error: aborting due to previous error
To learn more, run the command again with --verbose.

View file

@ -11,50 +11,38 @@ error: usage of `contains_key` followed by `insert` on a `HashMap`
|
17 | if !m.contains_key(&k) { foo(); m.insert(k, v); }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `m.entry(k)`
|
= note: `-D map-entry` implied by `-D warnings`
error: usage of `contains_key` followed by `insert` on a `HashMap`
--> entry.rs:21:5
|
21 | if !m.contains_key(&k) { m.insert(k, v) } else { None };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `m.entry(k)`
|
= note: `-D map-entry` implied by `-D warnings`
error: usage of `contains_key` followed by `insert` on a `HashMap`
--> entry.rs:25:5
|
25 | if m.contains_key(&k) { None } else { m.insert(k, v) };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `m.entry(k)`
|
= note: `-D map-entry` implied by `-D warnings`
error: usage of `contains_key` followed by `insert` on a `HashMap`
--> entry.rs:29:5
|
29 | if !m.contains_key(&k) { foo(); m.insert(k, v) } else { None };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `m.entry(k)`
|
= note: `-D map-entry` implied by `-D warnings`
error: usage of `contains_key` followed by `insert` on a `HashMap`
--> entry.rs:33:5
|
33 | if m.contains_key(&k) { None } else { foo(); m.insert(k, v) };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `m.entry(k)`
|
= note: `-D map-entry` implied by `-D warnings`
error: usage of `contains_key` followed by `insert` on a `BTreeMap`
--> entry.rs:37:5
|
37 | if !m.contains_key(&k) { foo(); m.insert(k, v) } else { None };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `m.entry(k)`
|
= note: `-D map-entry` implied by `-D warnings`
error: aborting due to previous error(s)
error: aborting due to 7 previous errors
To learn more, run the command again with --verbose.

View file

@ -11,10 +11,8 @@ error: don't use glob imports for enum variants
|
12 | use self::Enum::*;
| ^^^^^^^^^^^^^^^^^^
|
= note: `-D enum-glob-use` implied by `-D warnings`
error: aborting due to previous error(s)
error: aborting due to 2 previous errors
To learn more, run the command again with --verbose.

View file

@ -11,24 +11,18 @@ error: Variant name starts with the enum's name
|
25 | FoodGood,
| ^^^^^^^^
|
= note: `-D enum-variant-names` implied by `-D warnings`
error: Variant name starts with the enum's name
--> enum_variants.rs:26:5
|
26 | FoodMiddle,
| ^^^^^^^^^^
|
= note: `-D enum-variant-names` implied by `-D warnings`
error: Variant name starts with the enum's name
--> enum_variants.rs:27:5
|
27 | FoodBad,
| ^^^^^^^
|
= note: `-D enum-variant-names` implied by `-D warnings`
error: All variants have the same prefix: `Food`
--> enum_variants.rs:24:1
@ -40,7 +34,6 @@ error: All variants have the same prefix: `Food`
28 | | }
| |_^
|
= note: `-D enum-variant-names` implied by `-D warnings`
= help: remove the prefixes and use full paths to the variants instead of glob imports
error: All variants have the same prefix: `CallType`
@ -53,7 +46,6 @@ error: All variants have the same prefix: `CallType`
38 | | }
| |_^
|
= note: `-D enum-variant-names` implied by `-D warnings`
= help: remove the prefixes and use full paths to the variants instead of glob imports
error: All variants have the same prefix: `Constant`
@ -66,7 +58,6 @@ error: All variants have the same prefix: `Constant`
49 | | }
| |_^
|
= note: `-D enum-variant-names` implied by `-D warnings`
= help: remove the prefixes and use full paths to the variants instead of glob imports
error: All variants have the same prefix: `With`
@ -79,7 +70,6 @@ error: All variants have the same prefix: `With`
82 | | }
| |_^
|
= note: `-D enum-variant-names` implied by `-D warnings`
= help: remove the prefixes and use full paths to the variants instead of glob imports
error: All variants have the same prefix: `Prefix`
@ -92,7 +82,6 @@ error: All variants have the same prefix: `Prefix`
88 | | }
| |_^
|
= note: `-D enum-variant-names` implied by `-D warnings`
= help: remove the prefixes and use full paths to the variants instead of glob imports
error: All variants have the same prefix: `With`
@ -108,7 +97,7 @@ error: All variants have the same prefix: `With`
= note: `-D pub-enum-variant-names` implied by `-D warnings`
= help: remove the prefixes and use full paths to the variants instead of glob imports
error: aborting due to previous error(s)
error: aborting due to 10 previous errors
To learn more, run the command again with --verbose.

View file

@ -11,58 +11,44 @@ error: Clike enum variant discriminant is not portable to 32-bit targets
|
17 | X = 0x1_0000_0000,
| ^^^^^^^^^^^^^^^^^
|
= note: `-D enum-clike-unportable-variant` implied by `-D warnings`
error: Clike enum variant discriminant is not portable to 32-bit targets
--> enums_clike.rs:20:5
|
20 | A = 0xFFFF_FFFF,
| ^^^^^^^^^^^^^^^
|
= note: `-D enum-clike-unportable-variant` implied by `-D warnings`
error: Clike enum variant discriminant is not portable to 32-bit targets
--> enums_clike.rs:27:5
|
27 | Z = 0xFFFF_FFFF,
| ^^^^^^^^^^^^^^^
|
= note: `-D enum-clike-unportable-variant` implied by `-D warnings`
error: Clike enum variant discriminant is not portable to 32-bit targets
--> enums_clike.rs:28:5
|
28 | A = 0x1_0000_0000,
| ^^^^^^^^^^^^^^^^^
|
= note: `-D enum-clike-unportable-variant` implied by `-D warnings`
error: Clike enum variant discriminant is not portable to 32-bit targets
--> enums_clike.rs:30:5
|
30 | C = (std::i32::MIN as isize) - 1,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D enum-clike-unportable-variant` implied by `-D warnings`
error: Clike enum variant discriminant is not portable to 32-bit targets
--> enums_clike.rs:36:5
|
36 | Z = 0xFFFF_FFFF,
| ^^^^^^^^^^^^^^^
|
= note: `-D enum-clike-unportable-variant` implied by `-D warnings`
error: Clike enum variant discriminant is not portable to 32-bit targets
--> enums_clike.rs:37:5
|
37 | A = 0x1_0000_0000,
| ^^^^^^^^^^^^^^^^^
|
= note: `-D enum-clike-unportable-variant` implied by `-D warnings`
error: aborting due to previous error(s)
error: aborting due to 8 previous errors
To learn more, run the command again with --verbose.

View file

@ -11,40 +11,30 @@ error: this boolean expression can be simplified
|
39 | true || true;
| ^^^^^^^^^^^^ help: try `true`
|
= note: `-D nonminimal-bool` implied by `-D warnings`
error: this boolean expression can be simplified
--> eq_op.rs:45:5
|
45 | a == b && b == a;
| ^^^^^^^^^^^^^^^^ help: try `a == b`
|
= note: `-D nonminimal-bool` implied by `-D warnings`
error: this boolean expression can be simplified
--> eq_op.rs:46:5
|
46 | a != b && b != a;
| ^^^^^^^^^^^^^^^^ help: try `a != b`
|
= note: `-D nonminimal-bool` implied by `-D warnings`
error: this boolean expression can be simplified
--> eq_op.rs:47:5
|
47 | a < b && b > a;
| ^^^^^^^^^^^^^^ help: try `a < b`
|
= note: `-D nonminimal-bool` implied by `-D warnings`
error: this boolean expression can be simplified
--> eq_op.rs:48:5
|
48 | a <= b && b >= a;
| ^^^^^^^^^^^^^^^^ help: try `a <= b`
|
= note: `-D nonminimal-bool` implied by `-D warnings`
error: equal expressions as operands to `==`
--> eq_op.rs:10:5
@ -59,200 +49,150 @@ error: equal expressions as operands to `==`
|
11 | "no" == "no";
| ^^^^^^^^^^^^
|
= note: `-D eq-op` implied by `-D warnings`
error: equal expressions as operands to `!=`
--> eq_op.rs:13:5
|
13 | false != false;
| ^^^^^^^^^^^^^^
|
= note: `-D eq-op` implied by `-D warnings`
error: equal expressions as operands to `<`
--> eq_op.rs:14:5
|
14 | 1.5 < 1.5;
| ^^^^^^^^^
|
= note: `-D eq-op` implied by `-D warnings`
error: equal expressions as operands to `>=`
--> eq_op.rs:15:5
|
15 | 1u64 >= 1u64;
| ^^^^^^^^^^^^
|
= note: `-D eq-op` implied by `-D warnings`
error: equal expressions as operands to `&`
--> eq_op.rs:18:5
|
18 | (1 as u64) & (1 as u64);
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D eq-op` implied by `-D warnings`
error: equal expressions as operands to `^`
--> eq_op.rs:19:5
|
19 | 1 ^ ((((((1))))));
| ^^^^^^^^^^^^^^^^^
|
= note: `-D eq-op` implied by `-D warnings`
error: equal expressions as operands to `<`
--> eq_op.rs:22:5
|
22 | (-(2) < -(2));
| ^^^^^^^^^^^^^
|
= note: `-D eq-op` implied by `-D warnings`
error: equal expressions as operands to `==`
--> eq_op.rs:23:5
|
23 | ((1 + 1) & (1 + 1) == (1 + 1) & (1 + 1));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D eq-op` implied by `-D warnings`
error: equal expressions as operands to `&`
--> eq_op.rs:23:6
|
23 | ((1 + 1) & (1 + 1) == (1 + 1) & (1 + 1));
| ^^^^^^^^^^^^^^^^^
|
= note: `-D eq-op` implied by `-D warnings`
error: equal expressions as operands to `&`
--> eq_op.rs:23:27
|
23 | ((1 + 1) & (1 + 1) == (1 + 1) & (1 + 1));
| ^^^^^^^^^^^^^^^^^
|
= note: `-D eq-op` implied by `-D warnings`
error: equal expressions as operands to `==`
--> eq_op.rs:24:5
|
24 | (1 * 2) + (3 * 4) == 1 * 2 + 3 * 4;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D eq-op` implied by `-D warnings`
error: equal expressions as operands to `!=`
--> eq_op.rs:27:5
|
27 | ([1] != [1]);
| ^^^^^^^^^^^^
|
= note: `-D eq-op` implied by `-D warnings`
error: equal expressions as operands to `!=`
--> eq_op.rs:28:5
|
28 | ((1, 2) != (1, 2));
| ^^^^^^^^^^^^^^^^^^
|
= note: `-D eq-op` implied by `-D warnings`
error: equal expressions as operands to `==`
--> eq_op.rs:32:5
|
32 | 1 + 1 == 2;
| ^^^^^^^^^^
|
= note: `-D eq-op` implied by `-D warnings`
error: equal expressions as operands to `==`
--> eq_op.rs:33:5
|
33 | 1 - 1 == 0;
| ^^^^^^^^^^
|
= note: `-D eq-op` implied by `-D warnings`
error: equal expressions as operands to `-`
--> eq_op.rs:33:5
|
33 | 1 - 1 == 0;
| ^^^^^
|
= note: `-D eq-op` implied by `-D warnings`
error: equal expressions as operands to `-`
--> eq_op.rs:35:5
|
35 | 1 - 1;
| ^^^^^
|
= note: `-D eq-op` implied by `-D warnings`
error: equal expressions as operands to `/`
--> eq_op.rs:36:5
|
36 | 1 / 1;
| ^^^^^
|
= note: `-D eq-op` implied by `-D warnings`
error: equal expressions as operands to `&&`
--> eq_op.rs:37:5
|
37 | true && true;
| ^^^^^^^^^^^^
|
= note: `-D eq-op` implied by `-D warnings`
error: equal expressions as operands to `||`
--> eq_op.rs:39:5
|
39 | true || true;
| ^^^^^^^^^^^^
|
= note: `-D eq-op` implied by `-D warnings`
error: equal expressions as operands to `&&`
--> eq_op.rs:45:5
|
45 | a == b && b == a;
| ^^^^^^^^^^^^^^^^
|
= note: `-D eq-op` implied by `-D warnings`
error: equal expressions as operands to `&&`
--> eq_op.rs:46:5
|
46 | a != b && b != a;
| ^^^^^^^^^^^^^^^^
|
= note: `-D eq-op` implied by `-D warnings`
error: equal expressions as operands to `&&`
--> eq_op.rs:47:5
|
47 | a < b && b > a;
| ^^^^^^^^^^^^^^
|
= note: `-D eq-op` implied by `-D warnings`
error: equal expressions as operands to `&&`
--> eq_op.rs:48:5
|
48 | a <= b && b >= a;
| ^^^^^^^^^^^^^^^^
|
= note: `-D eq-op` implied by `-D warnings`
error: equal expressions as operands to `==`
--> eq_op.rs:51:5
|
51 | a == a;
| ^^^^^^
|
= note: `-D eq-op` implied by `-D warnings`
error: taken reference of right operand
--> eq_op.rs:89:13
@ -264,7 +204,7 @@ error: taken reference of right operand
|
= note: `-D op-ref` implied by `-D warnings`
error: aborting due to previous error(s)
error: aborting due to 33 previous errors
To learn more, run the command again with --verbose.

View file

@ -11,16 +11,12 @@ error: redundant closure found
|
8 | meta(|a| foo(a));
| ^^^^^^^^^^ help: remove closure as shown: `foo`
|
= note: `-D redundant-closure` implied by `-D warnings`
error: redundant closure found
--> eta.rs:9:27
|
9 | let c = Some(1u8).map(|a| {1+2; foo}(a));
| ^^^^^^^^^^^^^^^^^ help: remove closure as shown: `{1+2; foo}`
|
= note: `-D redundant-closure` implied by `-D warnings`
error: this expression borrows a reference that is immediately dereferenced by the compiler
--> eta.rs:11:21
@ -35,10 +31,8 @@ error: redundant closure found
|
18 | let e = Some(1u8).map(|a| generic(a));
| ^^^^^^^^^^^^^^ help: remove closure as shown: `generic`
|
= note: `-D redundant-closure` implied by `-D warnings`
error: aborting due to previous error(s)
error: aborting due to 5 previous errors
To learn more, run the command again with --verbose.

View file

@ -17,7 +17,6 @@ error: unsequenced read of a variable
11 | x += { x = 20; 2 };
| ^
|
= note: `-D eval-order-dependence` implied by `-D warnings`
note: whether read occurs before this write depends on evaluation order
--> eval_order_dependence.rs:11:12
|
@ -30,7 +29,6 @@ error: unsequenced read of a variable
17 | let foo = Foo { a: x, .. { x = 6; base } };
| ^
|
= note: `-D eval-order-dependence` implied by `-D warnings`
note: whether read occurs before this write depends on evaluation order
--> eval_order_dependence.rs:17:32
|
@ -43,14 +41,13 @@ error: unsequenced read of a variable
21 | x += { x = 20; 2 };
| ^
|
= note: `-D eval-order-dependence` implied by `-D warnings`
note: whether read occurs before this write depends on evaluation order
--> eval_order_dependence.rs:21:16
|
21 | x += { x = 20; 2 };
| ^^^^^^
error: aborting due to previous error(s)
error: aborting due to 4 previous errors
To learn more, run the command again with --verbose.

View file

@ -17,8 +17,6 @@ error: called `filter(p).flat_map(q)` on an `Iterator`. This is more succinctly
14 | | .filter(|&x| x == 0)
15 | | .flat_map(|x| x.checked_mul(2))
| |_______________________________________________________________^
|
= note: `-D filter-map` implied by `-D warnings`
error: called `filter_map(p).flat_map(q)` on an `Iterator`. This is more succinctly expressed by calling `.flat_map(..)` and filtering by returning an empty Iterator.
--> filter_methods.rs:18:21
@ -28,8 +26,6 @@ error: called `filter_map(p).flat_map(q)` on an `Iterator`. This is more succinc
19 | | .filter_map(|x| x.checked_mul(2))
20 | | .flat_map(|x| x.checked_mul(2))
| |_______________________________________________________________^
|
= note: `-D filter-map` implied by `-D warnings`
error: called `filter_map(p).map(q)` on an `Iterator`. This is more succinctly expressed by only calling `.filter_map(..)` instead.
--> filter_methods.rs:23:21
@ -39,10 +35,8 @@ error: called `filter_map(p).map(q)` on an `Iterator`. This is more succinctly e
24 | | .filter_map(|x| x.checked_mul(2))
25 | | .map(|x| x.checked_mul(2))
| |__________________________________________________________^
|
= note: `-D filter-map` implied by `-D warnings`
error: aborting due to previous error(s)
error: aborting due to 4 previous errors
To learn more, run the command again with --verbose.

View file

@ -17,7 +17,6 @@ error: strict comparison of f32 or f64
44 | ONE == 1.0 + 0.0;
| ^^^^^^^^^^^^^^^^ help: consider comparing them within some error `(ONE - (1.0 + 0.0)).abs() < error`
|
= note: `-D float-cmp` implied by `-D warnings`
note: std::f32::EPSILON and std::f64::EPSILON are available.
--> float_cmp.rs:44:5
|
@ -30,7 +29,6 @@ error: strict comparison of f32 or f64
45 | ONE + ONE == ZERO + ONE + ONE;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider comparing them within some error `(ONE + ONE - (ZERO + ONE + ONE)).abs() < error`
|
= note: `-D float-cmp` implied by `-D warnings`
note: std::f32::EPSILON and std::f64::EPSILON are available.
--> float_cmp.rs:45:5
|
@ -43,7 +41,6 @@ error: strict comparison of f32 or f64
46 | ONE != 2.0;
| ^^^^^^^^^^ help: consider comparing them within some error `(ONE - 2.0).abs() < error`
|
= note: `-D float-cmp` implied by `-D warnings`
note: std::f32::EPSILON and std::f64::EPSILON are available.
--> float_cmp.rs:46:5
|
@ -56,7 +53,6 @@ error: strict comparison of f32 or f64
48 | twice(ONE) != ONE;
| ^^^^^^^^^^^^^^^^^ help: consider comparing them within some error `(twice(ONE) - ONE).abs() < error`
|
= note: `-D float-cmp` implied by `-D warnings`
note: std::f32::EPSILON and std::f64::EPSILON are available.
--> float_cmp.rs:48:5
|
@ -69,7 +65,6 @@ error: strict comparison of f32 or f64
49 | ONE as f64 != 2.0;
| ^^^^^^^^^^^^^^^^^ help: consider comparing them within some error `(ONE as f64 - 2.0).abs() < error`
|
= note: `-D float-cmp` implied by `-D warnings`
note: std::f32::EPSILON and std::f64::EPSILON are available.
--> float_cmp.rs:49:5
|
@ -82,7 +77,6 @@ error: strict comparison of f32 or f64
54 | x == 1.0;
| ^^^^^^^^ help: consider comparing them within some error `(x - 1.0).abs() < error`
|
= note: `-D float-cmp` implied by `-D warnings`
note: std::f32::EPSILON and std::f64::EPSILON are available.
--> float_cmp.rs:54:5
|
@ -95,14 +89,13 @@ error: strict comparison of f32 or f64
57 | twice(x) != twice(ONE as f64);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider comparing them within some error `(twice(x) - twice(ONE as f64)).abs() < error`
|
= note: `-D float-cmp` implied by `-D warnings`
note: std::f32::EPSILON and std::f64::EPSILON are available.
--> float_cmp.rs:57:5
|
57 | twice(x) != twice(ONE as f64);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error(s)
error: aborting due to 8 previous errors
To learn more, run the command again with --verbose.

View file

@ -22,7 +22,6 @@ error: for loop over `option.ok_or("x not found")`, which is a `Result`. This is
26 | for x in option.ok_or("x not found") {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D for-loop-over-result` implied by `-D warnings`
= help: consider replacing `for x in option.ok_or("x not found")` with `if let Ok(x) = option.ok_or("x not found")`
error: you are iterating over `Iterator::next()` which is an Option; this will compile but is probably not what you want
@ -41,7 +40,6 @@ error: for loop over `v.iter().next().and(Some(0))`, which is an `Option`. This
36 | for x in v.iter().next().and(Some(0)) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D for-loop-over-option` implied by `-D warnings`
= help: consider replacing `for x in v.iter().next().and(Some(0))` with `if let Some(x) = v.iter().next().and(Some(0))`
error: for loop over `v.iter().next().ok_or("x not found")`, which is a `Result`. This is more readably written as an `if let` statement.
@ -50,7 +48,6 @@ error: for loop over `v.iter().next().ok_or("x not found")`, which is a `Result`
40 | for x in v.iter().next().ok_or("x not found") {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D for-loop-over-result` implied by `-D warnings`
= help: consider replacing `for x in v.iter().next().ok_or("x not found")` with `if let Ok(x) = v.iter().next().ok_or("x not found")`
error: this loop never actually loops
@ -72,8 +69,6 @@ error: this loop never actually loops
60 | | break;
61 | | }
| |_____^
|
= note: `-D never-loop` implied by `-D warnings`
error: the loop variable `i` is only used to index `vec`.
--> for_loop.rs:84:5
@ -101,7 +96,6 @@ error: the loop variable `i` is only used to index `vec`.
93 | for i in 0..vec.len() { let _ = vec[i]; }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D needless-range-loop` implied by `-D warnings`
help: consider using an iterator
| for <item> in &vec { let _ = vec[i]; }
@ -113,7 +107,6 @@ error: the loop variable `j` is only used to index `STATIC`.
98 | | }
| |_____^
|
= note: `-D needless-range-loop` implied by `-D warnings`
help: consider using an iterator
| for <item> in STATIC.iter().take(4) {
@ -125,7 +118,6 @@ error: the loop variable `j` is only used to index `CONST`.
102 | | }
| |_____^
|
= note: `-D needless-range-loop` implied by `-D warnings`
help: consider using an iterator
| for <item> in CONST.iter().take(4) {
@ -137,7 +129,6 @@ error: the loop variable `i` is used to index `vec`
106 | | }
| |_____^
|
= note: `-D needless-range-loop` implied by `-D warnings`
help: consider using an iterator
| for (i, <item>) in vec.iter().enumerate() {
@ -149,7 +140,6 @@ error: the loop variable `i` is only used to index `vec2`.
113 | | }
| |_____^
|
= note: `-D needless-range-loop` implied by `-D warnings`
help: consider using an iterator
| for <item> in vec2.iter().take(vec.len()) {
@ -161,7 +151,6 @@ error: the loop variable `i` is only used to index `vec`.
117 | | }
| |_____^
|
= note: `-D needless-range-loop` implied by `-D warnings`
help: consider using an iterator
| for <item> in vec.iter().skip(5) {
@ -173,7 +162,6 @@ error: the loop variable `i` is only used to index `vec`.
121 | | }
| |_____^
|
= note: `-D needless-range-loop` implied by `-D warnings`
help: consider using an iterator
| for <item> in vec.iter().take(MAX_LEN) {
@ -185,7 +173,6 @@ error: the loop variable `i` is only used to index `vec`.
125 | | }
| |_____^
|
= note: `-D needless-range-loop` implied by `-D warnings`
help: consider using an iterator
| for <item> in vec.iter().take(MAX_LEN + 1) {
@ -197,7 +184,6 @@ error: the loop variable `i` is only used to index `vec`.
129 | | }
| |_____^
|
= note: `-D needless-range-loop` implied by `-D warnings`
help: consider using an iterator
| for <item> in vec.iter().take(10).skip(5) {
@ -209,7 +195,6 @@ error: the loop variable `i` is only used to index `vec`.
133 | | }
| |_____^
|
= note: `-D needless-range-loop` implied by `-D warnings`
help: consider using an iterator
| for <item> in vec.iter().take(10 + 1).skip(5) {
@ -221,7 +206,6 @@ error: the loop variable `i` is used to index `vec`
137 | | }
| |_____^
|
= note: `-D needless-range-loop` implied by `-D warnings`
help: consider using an iterator
| for (i, <item>) in vec.iter().enumerate().skip(5) {
@ -233,7 +217,6 @@ error: the loop variable `i` is used to index `vec`
141 | | }
| |_____^
|
= note: `-D needless-range-loop` implied by `-D warnings`
help: consider using an iterator
| for (i, <item>) in vec.iter().enumerate().take(10).skip(5) {
@ -257,7 +240,6 @@ error: this range is empty so this for loop will never run
149 | | }
| |_____^
|
= note: `-D reverse-range-loop` implied by `-D warnings`
help: consider using the following if you are attempting to iterate over this range in reverse
| for i in (0...10).rev() {
@ -269,7 +251,6 @@ error: this range is empty so this for loop will never run
153 | | }
| |_____^
|
= note: `-D reverse-range-loop` implied by `-D warnings`
help: consider using the following if you are attempting to iterate over this range in reverse
| for i in (0..MAX_LEN).rev() {
@ -280,8 +261,6 @@ error: this range is empty so this for loop will never run
156 | | println!("{}", i);
157 | | }
| |_____^
|
= note: `-D reverse-range-loop` implied by `-D warnings`
error: this range is empty so this for loop will never run
--> for_loop.rs:176:5
@ -291,7 +270,6 @@ error: this range is empty so this for loop will never run
178 | | }
| |_____^
|
= note: `-D reverse-range-loop` implied by `-D warnings`
help: consider using the following if you are attempting to iterate over this range in reverse
| for i in (5+4..10).rev() {
@ -303,7 +281,6 @@ error: this range is empty so this for loop will never run
182 | | }
| |_____^
|
= note: `-D reverse-range-loop` implied by `-D warnings`
help: consider using the following if you are attempting to iterate over this range in reverse
| for i in ((3-1)..(5+2)).rev() {
@ -314,8 +291,6 @@ error: this range is empty so this for loop will never run
185 | | println!("{}", i);
186 | | }
| |_____^
|
= note: `-D reverse-range-loop` implied by `-D warnings`
error: use of deprecated item: replaced by `Iterator::step_by`
--> for_loop.rs:192:22
@ -338,8 +313,6 @@ error: it is more idiomatic to loop over references to containers instead of usi
|
209 | for _v in vec.iter_mut() { }
| ^^^^^^^^^^^^^^ help: to write this more concisely, try `&mut vec`
|
= note: `-D explicit-iter-loop` implied by `-D warnings`
error: it is more idiomatic to loop over containers instead of using explicit iteration methods`
--> for_loop.rs:212:15
@ -354,88 +327,66 @@ error: it is more idiomatic to loop over references to containers instead of usi
|
215 | for _v in array.into_iter() {}
| ^^^^^^^^^^^^^^^^^ help: to write this more concisely, try `&array`
|
= note: `-D explicit-iter-loop` implied by `-D warnings`
error: it is more idiomatic to loop over references to containers instead of using explicit iteration methods
--> for_loop.rs:220:15
|
220 | for _v in [1, 2, 3].iter() { }
| ^^^^^^^^^^^^^^^^ help: to write this more concisely, try `&[1, 2, 3]`
|
= note: `-D explicit-iter-loop` implied by `-D warnings`
error: it is more idiomatic to loop over references to containers instead of using explicit iteration methods
--> for_loop.rs:224:15
|
224 | for _v in [0; 32].iter() {}
| ^^^^^^^^^^^^^^ help: to write this more concisely, try `&[0; 32]`
|
= note: `-D explicit-iter-loop` implied by `-D warnings`
error: it is more idiomatic to loop over references to containers instead of using explicit iteration methods
--> for_loop.rs:229:15
|
229 | for _v in ll.iter() { }
| ^^^^^^^^^ help: to write this more concisely, try `&ll`
|
= note: `-D explicit-iter-loop` implied by `-D warnings`
error: it is more idiomatic to loop over references to containers instead of using explicit iteration methods
--> for_loop.rs:232:15
|
232 | for _v in vd.iter() { }
| ^^^^^^^^^ help: to write this more concisely, try `&vd`
|
= note: `-D explicit-iter-loop` implied by `-D warnings`
error: it is more idiomatic to loop over references to containers instead of using explicit iteration methods
--> for_loop.rs:235:15
|
235 | for _v in bh.iter() { }
| ^^^^^^^^^ help: to write this more concisely, try `&bh`
|
= note: `-D explicit-iter-loop` implied by `-D warnings`
error: it is more idiomatic to loop over references to containers instead of using explicit iteration methods
--> for_loop.rs:238:15
|
238 | for _v in hm.iter() { }
| ^^^^^^^^^ help: to write this more concisely, try `&hm`
|
= note: `-D explicit-iter-loop` implied by `-D warnings`
error: it is more idiomatic to loop over references to containers instead of using explicit iteration methods
--> for_loop.rs:241:15
|
241 | for _v in bt.iter() { }
| ^^^^^^^^^ help: to write this more concisely, try `&bt`
|
= note: `-D explicit-iter-loop` implied by `-D warnings`
error: it is more idiomatic to loop over references to containers instead of using explicit iteration methods
--> for_loop.rs:244:15
|
244 | for _v in hs.iter() { }
| ^^^^^^^^^ help: to write this more concisely, try `&hs`
|
= note: `-D explicit-iter-loop` implied by `-D warnings`
error: it is more idiomatic to loop over references to containers instead of using explicit iteration methods
--> for_loop.rs:247:15
|
247 | for _v in bs.iter() { }
| ^^^^^^^^^ help: to write this more concisely, try `&bs`
|
= note: `-D explicit-iter-loop` implied by `-D warnings`
error: you are iterating over `Iterator::next()` which is an Option; this will compile but is probably not what you want
--> for_loop.rs:249:5
|
249 | for _v in vec.iter().next() { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D iter-next-loop` implied by `-D warnings`
error: you are collect()ing an iterator and throwing away the result. Consider using an explicit for loop to exhaust the iterator
--> for_loop.rs:256:5
@ -458,8 +409,6 @@ error: the variable `_index` is used as a loop counter. Consider using `for (_in
|
265 | for _v in &vec { _index += 1 }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D explicit-counter-loop` implied by `-D warnings`
error: you seem to want to iterate on a map's values
--> for_loop.rs:325:5
@ -483,7 +432,6 @@ error: you seem to want to iterate on a map's values
334 | | }
| |_____^
|
= note: `-D for-kv-map` implied by `-D warnings`
help: use the corresponding method
| for v in (*m).values() {
@ -495,7 +443,6 @@ error: you seem to want to iterate on a map's values
339 | | }
| |_____^
|
= note: `-D for-kv-map` implied by `-D warnings`
help: use the corresponding method
| for v in m.values_mut() {
@ -507,7 +454,6 @@ error: you seem to want to iterate on a map's values
344 | | }
| |_____^
|
= note: `-D for-kv-map` implied by `-D warnings`
help: use the corresponding method
| for v in (*m).values_mut() {
@ -519,11 +465,10 @@ error: you seem to want to iterate on a map's keys
350 | | }
| |_____^
|
= note: `-D for-kv-map` implied by `-D warnings`
help: use the corresponding method
| for k in rm.keys() {
error: aborting due to previous error(s)
error: aborting due to 52 previous errors
To learn more, run the command again with --verbose.

View file

@ -11,18 +11,14 @@ error: useless use of `format!`
|
8 | format!("{}", "foo");
| ^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D useless-format` implied by `-D warnings`
error: useless use of `format!`
--> format.rs:15:5
|
15 | format!("{}", arg);
| ^^^^^^^^^^^^^^^^^^^
|
= note: `-D useless-format` implied by `-D warnings`
error: aborting due to previous error(s)
error: aborting due to 3 previous errors
To learn more, run the command again with --verbose.

View file

@ -13,7 +13,6 @@ error: this looks like an `else if` but the `else` is missing
22 | } if foo() {
| ^
|
= note: `-D suspicious-else-formatting` implied by `-D warnings`
= note: to remove this lint, add the missing `else` or add a new line before the second `if`
error: this looks like an `else if` but the `else` is missing
@ -22,7 +21,6 @@ error: this looks like an `else if` but the `else` is missing
30 | } if foo() {
| ^
|
= note: `-D suspicious-else-formatting` implied by `-D warnings`
= note: to remove this lint, add the missing `else` or add a new line before the second `if`
error: this is an `else if` but the formatting might hide it
@ -33,7 +31,6 @@ error: this is an `else if` but the formatting might hide it
40 | | if foo() { // the span of the above error should continue here
| |____^
|
= note: `-D suspicious-else-formatting` implied by `-D warnings`
= note: to remove this lint, remove the `else` or remove the new line between `else` and `if`
error: this is an `else if` but the formatting might hide it
@ -45,7 +42,6 @@ error: this is an `else if` but the formatting might hide it
46 | | if foo() { // the span of the above error should continue here
| |____^
|
= note: `-D suspicious-else-formatting` implied by `-D warnings`
= note: to remove this lint, remove the `else` or remove the new line between `else` and `if`
error: this looks like you are trying to use `.. -= ..`, but you really are doing `.. = (- ..)`
@ -63,7 +59,6 @@ error: this looks like you are trying to use `.. *= ..`, but you really are doin
72 | a =* &191;
| ^^^^
|
= note: `-D suspicious-assignment-formatting` implied by `-D warnings`
= note: to remove this lint, use either `*=` or `= *`
error: this looks like you are trying to use `.. != ..`, but you really are doing `.. = (! ..)`
@ -72,7 +67,6 @@ error: this looks like you are trying to use `.. != ..`, but you really are doin
75 | b =! false;
| ^^^^
|
= note: `-D suspicious-assignment-formatting` implied by `-D warnings`
= note: to remove this lint, use either `!=` or `= !`
error: possibly missing a comma here
@ -90,10 +84,9 @@ error: possibly missing a comma here
88 | -1, -2, -3 // <= no comma here
| ^
|
= note: `-D possible-missing-comma` implied by `-D warnings`
= note: to remove this lint, add a comma or write the expr in a single line
error: aborting due to previous error(s)
error: aborting due to 10 previous errors
To learn more, run the command again with --verbose.

View file

@ -12,16 +12,12 @@ error: this function has too many arguments (8/7)
|
19 | fn bad(_one: u32, _two: u32, _three: &str, _four: bool, _five: f32, _six: f32, _seven: bool, _eight: ());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D too-many-arguments` implied by `-D warnings`
error: this function has too many arguments (8/7)
--> functions.rs:28:5
|
28 | fn bad_method(_one: u32, _two: u32, _three: &str, _four: bool, _five: f32, _six: f32, _seven: bool, _eight: ()) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D too-many-arguments` implied by `-D warnings`
error: this public function dereferences a raw pointer but is not marked `unsafe`
--> functions.rs:37:34
@ -36,66 +32,50 @@ error: this public function dereferences a raw pointer but is not marked `unsafe
|
38 | println!("{:?}", unsafe { p.as_ref() });
| ^
|
= note: `-D not-unsafe-ptr-arg-deref` implied by `-D warnings`
error: this public function dereferences a raw pointer but is not marked `unsafe`
--> functions.rs:39:33
|
39 | unsafe { std::ptr::read(p) };
| ^
|
= note: `-D not-unsafe-ptr-arg-deref` implied by `-D warnings`
error: this public function dereferences a raw pointer but is not marked `unsafe`
--> functions.rs:50:30
|
50 | println!("{}", unsafe { *p });
| ^
|
= note: `-D not-unsafe-ptr-arg-deref` implied by `-D warnings`
error: this public function dereferences a raw pointer but is not marked `unsafe`
--> functions.rs:51:31
|
51 | println!("{:?}", unsafe { p.as_ref() });
| ^
|
= note: `-D not-unsafe-ptr-arg-deref` implied by `-D warnings`
error: this public function dereferences a raw pointer but is not marked `unsafe`
--> functions.rs:52:29
|
52 | unsafe { std::ptr::read(p) };
| ^
|
= note: `-D not-unsafe-ptr-arg-deref` implied by `-D warnings`
error: this public function dereferences a raw pointer but is not marked `unsafe`
--> functions.rs:61:34
|
61 | println!("{}", unsafe { *p });
| ^
|
= note: `-D not-unsafe-ptr-arg-deref` implied by `-D warnings`
error: this public function dereferences a raw pointer but is not marked `unsafe`
--> functions.rs:62:35
|
62 | println!("{:?}", unsafe { p.as_ref() });
| ^
|
= note: `-D not-unsafe-ptr-arg-deref` implied by `-D warnings`
error: this public function dereferences a raw pointer but is not marked `unsafe`
--> functions.rs:63:33
|
63 | unsafe { std::ptr::read(p) };
| ^
|
= note: `-D not-unsafe-ptr-arg-deref` implied by `-D warnings`
error: aborting due to previous error(s)
error: aborting due to 12 previous errors
To learn more, run the command again with --verbose.

View file

@ -11,50 +11,38 @@ error: the operation is ineffective. Consider reducing it to `x`
|
14 | x + (1 - 1);
| ^^^^^^^^^^^
|
= note: `-D identity-op` implied by `-D warnings`
error: the operation is ineffective. Consider reducing it to `x`
--> identity_op.rs:16:5
|
16 | 0 + x;
| ^^^^^
|
= note: `-D identity-op` implied by `-D warnings`
error: the operation is ineffective. Consider reducing it to `x`
--> identity_op.rs:19:5
|
19 | x | (0);
| ^^^^^^^
|
= note: `-D identity-op` implied by `-D warnings`
error: the operation is ineffective. Consider reducing it to `x`
--> identity_op.rs:22:5
|
22 | x * 1;
| ^^^^^
|
= note: `-D identity-op` implied by `-D warnings`
error: the operation is ineffective. Consider reducing it to `x`
--> identity_op.rs:23:5
|
23 | 1 * x;
| ^^^^^
|
= note: `-D identity-op` implied by `-D warnings`
error: the operation is ineffective. Consider reducing it to `x`
--> identity_op.rs:29:5
|
29 | -1 & x;
| ^^^^^^
|
= note: `-D identity-op` implied by `-D warnings`
error: aborting due to previous error(s)
error: aborting due to 7 previous errors
To learn more, run the command again with --verbose.

View file

@ -11,26 +11,20 @@ error: redundant pattern matching, consider using `is_err()`
|
11 | if let Err(_) = Err::<i32, i32>(42) {
| -------^^^^^^---------------------- help: try this `if Err::<i32, i32>(42).is_err()`
|
= note: `-D if-let-redundant-pattern-matching` implied by `-D warnings`
error: redundant pattern matching, consider using `is_none()`
--> if_let_redundant_pattern_matching.rs:14:12
|
14 | if let None = None::<()> {
| -------^^^^------------- help: try this `if None::<()>.is_none()`
|
= note: `-D if-let-redundant-pattern-matching` implied by `-D warnings`
error: redundant pattern matching, consider using `is_some()`
--> if_let_redundant_pattern_matching.rs:17:12
|
17 | if let Some(_) = Some(42) {
| -------^^^^^^^----------- help: try this `if Some(42).is_some()`
|
= note: `-D if-let-redundant-pattern-matching` implied by `-D warnings`
error: aborting due to previous error(s)
error: aborting due to 4 previous errors
To learn more, run the command again with --verbose.

View file

@ -21,10 +21,9 @@ error: Unnecessary `!=` operation
18 | | }
| |_____^
|
= note: `-D if-not-else` implied by `-D warnings`
= help: change to `==` and swap the blocks of the if/else
error: aborting due to previous error(s)
error: aborting due to 2 previous errors
To learn more, run the command again with --verbose.

View file

@ -11,210 +11,158 @@ error: because of the numeric bounds on `u8` prior to casting, this expression i
|
17 | (u8 as i32) > 300;
| ^^^^^^^^^^^^^^^^^
|
= note: `-D invalid-upcast-comparisons` implied by `-D warnings`
error: because of the numeric bounds on `u8` prior to casting, this expression is always false
--> invalid_upcast_comparisons.rs:18:5
|
18 | (u8 as u32) == 300;
| ^^^^^^^^^^^^^^^^^^
|
= note: `-D invalid-upcast-comparisons` implied by `-D warnings`
error: because of the numeric bounds on `u8` prior to casting, this expression is always false
--> invalid_upcast_comparisons.rs:19:5
|
19 | (u8 as i32) == 300;
| ^^^^^^^^^^^^^^^^^^
|
= note: `-D invalid-upcast-comparisons` implied by `-D warnings`
error: because of the numeric bounds on `u8` prior to casting, this expression is always false
--> invalid_upcast_comparisons.rs:20:5
|
20 | 300 < (u8 as u32);
| ^^^^^^^^^^^^^^^^^
|
= note: `-D invalid-upcast-comparisons` implied by `-D warnings`
error: because of the numeric bounds on `u8` prior to casting, this expression is always false
--> invalid_upcast_comparisons.rs:21:5
|
21 | 300 < (u8 as i32);
| ^^^^^^^^^^^^^^^^^
|
= note: `-D invalid-upcast-comparisons` implied by `-D warnings`
error: because of the numeric bounds on `u8` prior to casting, this expression is always false
--> invalid_upcast_comparisons.rs:22:5
|
22 | 300 == (u8 as u32);
| ^^^^^^^^^^^^^^^^^^
|
= note: `-D invalid-upcast-comparisons` implied by `-D warnings`
error: because of the numeric bounds on `u8` prior to casting, this expression is always false
--> invalid_upcast_comparisons.rs:23:5
|
23 | 300 == (u8 as i32);
| ^^^^^^^^^^^^^^^^^^
|
= note: `-D invalid-upcast-comparisons` implied by `-D warnings`
error: because of the numeric bounds on `u8` prior to casting, this expression is always true
--> invalid_upcast_comparisons.rs:25:5
|
25 | (u8 as u32) <= 300;
| ^^^^^^^^^^^^^^^^^^
|
= note: `-D invalid-upcast-comparisons` implied by `-D warnings`
error: because of the numeric bounds on `u8` prior to casting, this expression is always true
--> invalid_upcast_comparisons.rs:26:5
|
26 | (u8 as i32) <= 300;
| ^^^^^^^^^^^^^^^^^^
|
= note: `-D invalid-upcast-comparisons` implied by `-D warnings`
error: because of the numeric bounds on `u8` prior to casting, this expression is always true
--> invalid_upcast_comparisons.rs:27:5
|
27 | (u8 as u32) != 300;
| ^^^^^^^^^^^^^^^^^^
|
= note: `-D invalid-upcast-comparisons` implied by `-D warnings`
error: because of the numeric bounds on `u8` prior to casting, this expression is always true
--> invalid_upcast_comparisons.rs:28:5
|
28 | (u8 as i32) != 300;
| ^^^^^^^^^^^^^^^^^^
|
= note: `-D invalid-upcast-comparisons` implied by `-D warnings`
error: because of the numeric bounds on `u8` prior to casting, this expression is always true
--> invalid_upcast_comparisons.rs:29:5
|
29 | 300 >= (u8 as u32);
| ^^^^^^^^^^^^^^^^^^
|
= note: `-D invalid-upcast-comparisons` implied by `-D warnings`
error: because of the numeric bounds on `u8` prior to casting, this expression is always true
--> invalid_upcast_comparisons.rs:30:5
|
30 | 300 >= (u8 as i32);
| ^^^^^^^^^^^^^^^^^^
|
= note: `-D invalid-upcast-comparisons` implied by `-D warnings`
error: because of the numeric bounds on `u8` prior to casting, this expression is always true
--> invalid_upcast_comparisons.rs:31:5
|
31 | 300 != (u8 as u32);
| ^^^^^^^^^^^^^^^^^^
|
= note: `-D invalid-upcast-comparisons` implied by `-D warnings`
error: because of the numeric bounds on `u8` prior to casting, this expression is always true
--> invalid_upcast_comparisons.rs:32:5
|
32 | 300 != (u8 as i32);
| ^^^^^^^^^^^^^^^^^^
|
= note: `-D invalid-upcast-comparisons` implied by `-D warnings`
error: because of the numeric bounds on `u8` prior to casting, this expression is always false
--> invalid_upcast_comparisons.rs:35:5
|
35 | (u8 as i32) < 0;
| ^^^^^^^^^^^^^^^
|
= note: `-D invalid-upcast-comparisons` implied by `-D warnings`
error: because of the numeric bounds on `u8` prior to casting, this expression is always true
--> invalid_upcast_comparisons.rs:36:5
|
36 | -5 != (u8 as i32);
| ^^^^^^^^^^^^^^^^^
|
= note: `-D invalid-upcast-comparisons` implied by `-D warnings`
error: because of the numeric bounds on `u8` prior to casting, this expression is always true
--> invalid_upcast_comparisons.rs:38:5
|
38 | (u8 as i32) >= 0;
| ^^^^^^^^^^^^^^^^
|
= note: `-D invalid-upcast-comparisons` implied by `-D warnings`
error: because of the numeric bounds on `u8` prior to casting, this expression is always false
--> invalid_upcast_comparisons.rs:39:5
|
39 | -5 == (u8 as i32);
| ^^^^^^^^^^^^^^^^^
|
= note: `-D invalid-upcast-comparisons` implied by `-D warnings`
error: because of the numeric bounds on `u8` prior to casting, this expression is always false
--> invalid_upcast_comparisons.rs:42:5
|
42 | 1337 == (u8 as i32);
| ^^^^^^^^^^^^^^^^^^^
|
= note: `-D invalid-upcast-comparisons` implied by `-D warnings`
error: because of the numeric bounds on `u8` prior to casting, this expression is always false
--> invalid_upcast_comparisons.rs:43:5
|
43 | 1337 == (u8 as u32);
| ^^^^^^^^^^^^^^^^^^^
|
= note: `-D invalid-upcast-comparisons` implied by `-D warnings`
error: because of the numeric bounds on `u8` prior to casting, this expression is always true
--> invalid_upcast_comparisons.rs:45:5
|
45 | 1337 != (u8 as i32);
| ^^^^^^^^^^^^^^^^^^^
|
= note: `-D invalid-upcast-comparisons` implied by `-D warnings`
error: because of the numeric bounds on `u8` prior to casting, this expression is always true
--> invalid_upcast_comparisons.rs:46:5
|
46 | 1337 != (u8 as u32);
| ^^^^^^^^^^^^^^^^^^^
|
= note: `-D invalid-upcast-comparisons` implied by `-D warnings`
error: because of the numeric bounds on `u8` prior to casting, this expression is always true
--> invalid_upcast_comparisons.rs:61:5
|
61 | (u8 as i32) > -1;
| ^^^^^^^^^^^^^^^^
|
= note: `-D invalid-upcast-comparisons` implied by `-D warnings`
error: because of the numeric bounds on `u8` prior to casting, this expression is always false
--> invalid_upcast_comparisons.rs:62:5
|
62 | (u8 as i32) < -1;
| ^^^^^^^^^^^^^^^^
|
= note: `-D invalid-upcast-comparisons` implied by `-D warnings`
error: because of the numeric bounds on `u8` prior to casting, this expression is always false
--> invalid_upcast_comparisons.rs:78:5
|
78 | -5 >= (u8 as i32);
| ^^^^^^^^^^^^^^^^^
|
= note: `-D invalid-upcast-comparisons` implied by `-D warnings`
error: aborting due to previous error(s)
error: aborting due to 27 previous errors
To learn more, run the command again with --verbose.

View file

@ -11,10 +11,8 @@ error: adding items after statements is confusing, since items exist from the st
|
17 | fn foo() { println!("foo"); }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D items-after-statements` implied by `-D warnings`
error: aborting due to previous error(s)
error: aborting due to 2 previous errors
To learn more, run the command again with --verbose.

View file

@ -14,7 +14,6 @@ error: large size difference between variants
21 | C(T, [i32; 8000]),
| ^^^^^^^^^^^^^^^^^
|
= note: `-D large-enum-variant` implied by `-D warnings`
help: consider boxing the large fields to reduce the total size of the enum
--> large_enum_variant.rs:21:5
|
@ -27,7 +26,6 @@ error: large size difference between variants
34 | ContainingLargeEnum(LargeEnum),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D large-enum-variant` implied by `-D warnings`
help: consider boxing the large fields to reduce the total size of the enum
| ContainingLargeEnum(Box<LargeEnum>),
@ -37,7 +35,6 @@ error: large size difference between variants
37 | ContainingMoreThanOneField(i32, [i32; 8000], [i32; 9500]),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D large-enum-variant` implied by `-D warnings`
help: consider boxing the large fields to reduce the total size of the enum
--> large_enum_variant.rs:37:5
|
@ -50,7 +47,6 @@ error: large size difference between variants
44 | StructLikeLarge { x: [i32; 8000], y: i32 },
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D large-enum-variant` implied by `-D warnings`
help: consider boxing the large fields to reduce the total size of the enum
--> large_enum_variant.rs:44:5
|
@ -63,11 +59,10 @@ error: large size difference between variants
49 | StructLikeLarge2 { x: [i32; 8000] },
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D large-enum-variant` implied by `-D warnings`
help: consider boxing the large fields to reduce the total size of the enum
| StructLikeLarge2 { x: Box<[i32; 8000]> },
error: aborting due to previous error(s)
error: aborting due to 6 previous errors
To learn more, run the command again with --verbose.

View file

@ -17,8 +17,6 @@ error: trait `PubTraitsToo` has a `len` method but no `is_empty` method
56 | | fn len(self: &Self) -> isize;
57 | | }
| |_^
|
= note: `-D len-without-is-empty` implied by `-D warnings`
error: item `HasIsEmpty` has a public `len` method but a private `is_empty` method
--> len_zero.rs:89:1
@ -31,8 +29,6 @@ error: item `HasIsEmpty` has a public `len` method but a private `is_empty` meth
96 | | }
97 | | }
| |_^
|
= note: `-D len-without-is-empty` implied by `-D warnings`
error: item `HasWrongIsEmpty` has a public `len` method but no corresponding `is_empty` method
--> len_zero.rs:118:1
@ -45,8 +41,6 @@ error: item `HasWrongIsEmpty` has a public `len` method but no corresponding `is
125 | | }
126 | | }
| |_^
|
= note: `-D len-without-is-empty` implied by `-D warnings`
error: length comparison to zero
--> len_zero.rs:130:8
@ -61,50 +55,38 @@ error: length comparison to zero
|
134 | if "".len() == 0 {
| ^^^^^^^^^^^^^ help: using `is_empty` is more concise: `"".is_empty()`
|
= note: `-D len-zero` implied by `-D warnings`
error: length comparison to zero
--> len_zero.rs:148:8
|
148 | if has_is_empty.len() == 0 {
| ^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is more concise: `has_is_empty.is_empty()`
|
= note: `-D len-zero` implied by `-D warnings`
error: length comparison to zero
--> len_zero.rs:151:8
|
151 | if has_is_empty.len() != 0 {
| ^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is more concise: `!has_is_empty.is_empty()`
|
= note: `-D len-zero` implied by `-D warnings`
error: length comparison to zero
--> len_zero.rs:154:8
|
154 | if has_is_empty.len() > 0 {
| ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is more concise: `!has_is_empty.is_empty()`
|
= note: `-D len-zero` implied by `-D warnings`
error: length comparison to zero
--> len_zero.rs:160:8
|
160 | if with_is_empty.len() == 0 {
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is more concise: `with_is_empty.is_empty()`
|
= note: `-D len-zero` implied by `-D warnings`
error: length comparison to zero
--> len_zero.rs:172:8
|
172 | if b.len() != 0 {
| ^^^^^^^^^^^^ help: using `is_empty` is more concise: `!b.is_empty()`
|
= note: `-D len-zero` 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.

View file

@ -22,7 +22,6 @@ error: `if _ { .. } else { .. }` is an expression
69 | | }
| |_____^ help: it is more idiomatic to write `let <mut> bar = if f() { ..; 42 } else { ..; 0 };`
|
= note: `-D useless-let-if-seq` implied by `-D warnings`
= note: you might not need `mut` at all
error: `if _ { .. } else { .. }` is an expression
@ -35,8 +34,6 @@ error: `if _ { .. } else { .. }` is an expression
75 | | quz = 0;
76 | | }
| |_____^ help: it is more idiomatic to write `let quz = if f() { 42 } else { 0 };`
|
= note: `-D useless-let-if-seq` implied by `-D warnings`
error: `if _ { .. } else { .. }` is an expression
--> let_if_seq.rs:100:5
@ -47,10 +44,9 @@ error: `if _ { .. } else { .. }` is an expression
103 | | }
| |_____^ help: it is more idiomatic to write `let <mut> baz = if f() { 42 } else { 0 };`
|
= note: `-D useless-let-if-seq` implied by `-D warnings`
= note: you might not need `mut` at all
error: aborting due to previous error(s)
error: aborting due to 4 previous errors
To learn more, run the command again with --verbose.

View file

@ -17,14 +17,13 @@ error: returning the result of a let binding from a block. Consider returning th
16 | x
| ^
|
= note: `-D let-and-return` implied by `-D warnings`
note: this expression can be directly returned
--> let_return.rs:15:17
|
15 | let x = 5;
| ^
error: aborting due to previous error(s)
error: aborting due to 2 previous errors
To learn more, run the command again with --verbose.

View file

@ -11,10 +11,8 @@ error: this let-binding has unit value. Consider omitting `let _a =`
|
18 | let _a = ();
| ^^^^^^^^^^^^
|
= note: `-D let-unit-value` implied by `-D warnings`
error: aborting due to previous error(s)
error: aborting due to 2 previous errors
To learn more, run the command again with --verbose.

View file

@ -11,40 +11,30 @@ error: explicit lifetimes given in parameter types where they could be elided
|
9 | fn distinct_and_static<'a, 'b>(_x: &'a u8, _y: &'b u8, _z: &'static u8) { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D needless-lifetimes` implied by `-D warnings`
error: explicit lifetimes given in parameter types where they could be elided
--> lifetimes.rs:17:1
|
17 | fn in_and_out<'a>(x: &'a u8, _y: u8) -> &'a u8 { x }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D needless-lifetimes` implied by `-D warnings`
error: explicit lifetimes given in parameter types where they could be elided
--> lifetimes.rs:29:1
|
29 | fn deep_reference_3<'a>(x: &'a u8, _y: u8) -> Result<&'a u8, ()> { Ok(x) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D needless-lifetimes` implied by `-D warnings`
error: explicit lifetimes given in parameter types where they could be elided
--> lifetimes.rs:32:1
|
32 | fn where_clause_without_lt<'a, T>(x: &'a u8, _y: u8) -> Result<&'a u8, ()> where T: Copy { Ok(x) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D needless-lifetimes` implied by `-D warnings`
error: explicit lifetimes given in parameter types where they could be elided
--> lifetimes.rs:38:1
|
38 | fn lifetime_param_2<'a, 'b>(_x: Ref<'a>, _y: &'b u8) { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D needless-lifetimes` implied by `-D warnings`
error: explicit lifetimes given in parameter types where they could be elided
--> lifetimes.rs:52:1
@ -53,66 +43,50 @@ error: explicit lifetimes given in parameter types where they could be elided
53 | | where for<'x> F: Fn(Lt<'x, I>) -> Lt<'x, I>
54 | | { unreachable!() }
| |__________________^
|
= note: `-D needless-lifetimes` implied by `-D warnings`
error: explicit lifetimes given in parameter types where they could be elided
--> lifetimes.rs:61:5
|
61 | fn self_and_out<'s>(&'s self) -> &'s u8 { &self.x }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D needless-lifetimes` implied by `-D warnings`
error: explicit lifetimes given in parameter types where they could be elided
--> lifetimes.rs:65:5
|
65 | fn distinct_self_and_in<'s, 't>(&'s self, _x: &'t u8) { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D needless-lifetimes` implied by `-D warnings`
error: explicit lifetimes given in parameter types where they could be elided
--> lifetimes.rs:81:1
|
81 | fn struct_with_lt<'a>(_foo: Foo<'a>) -> &'a str { unimplemented!() }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D needless-lifetimes` implied by `-D warnings`
error: explicit lifetimes given in parameter types where they could be elided
--> lifetimes.rs:101:1
|
101 | fn trait_obj_elided2<'a>(_arg: &'a Drop) -> &'a str { unimplemented!() }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D needless-lifetimes` implied by `-D warnings`
error: explicit lifetimes given in parameter types where they could be elided
--> lifetimes.rs:105:1
|
105 | fn alias_with_lt<'a>(_foo: FooAlias<'a>) -> &'a str { unimplemented!() }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D needless-lifetimes` implied by `-D warnings`
error: explicit lifetimes given in parameter types where they could be elided
--> lifetimes.rs:116:1
|
116 | fn named_input_elided_output<'a>(_arg: &'a str) -> &str { unimplemented!() }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D needless-lifetimes` implied by `-D warnings`
error: explicit lifetimes given in parameter types where they could be elided
--> lifetimes.rs:120:1
|
120 | fn trait_bound_ok<'a, T: WithLifetime<'static>>(_: &'a u8, _: T) { unimplemented!() }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D needless-lifetimes` implied by `-D warnings`
error: aborting due to previous error(s)
error: aborting due to 14 previous errors
To learn more, run the command again with --verbose.

View file

@ -6,7 +6,7 @@ error: the lint `MISSING_LINT` is not added to any `LintPass`
|
= note: `-D lint-without-lint-pass` implied by `-D warnings`
error: aborting due to previous error(s)
error: aborting due to previous error
To learn more, run the command again with --verbose.

View file

@ -11,16 +11,12 @@ error: inconsistent casing in hexadecimal literal
|
15 | let fail2 = 0xabCD_u32;
| ^^^^^^^^^^
|
= note: `-D mixed-case-hex-literals` implied by `-D warnings`
error: inconsistent casing in hexadecimal literal
--> literals.rs:16:17
|
16 | let fail2 = 0xabCD_isize;
| ^^^^^^^^^^^^
|
= note: `-D mixed-case-hex-literals` implied by `-D warnings`
error: integer type suffix should be separated by an underscore
--> literals.rs:17:27
@ -47,40 +43,30 @@ error: integer type suffix should be separated by an underscore
|
22 | let fail3 = 1234i32;
| ^^^^^^^
|
= note: `-D unseparated-literal-suffix` implied by `-D warnings`
error: integer type suffix should be separated by an underscore
--> literals.rs:23:17
|
23 | let fail4 = 1234u32;
| ^^^^^^^
|
= note: `-D unseparated-literal-suffix` implied by `-D warnings`
error: integer type suffix should be separated by an underscore
--> literals.rs:24:17
|
24 | let fail5 = 1234isize;
| ^^^^^^^^^
|
= note: `-D unseparated-literal-suffix` implied by `-D warnings`
error: integer type suffix should be separated by an underscore
--> literals.rs:25:17
|
25 | let fail6 = 1234usize;
| ^^^^^^^^^
|
= note: `-D unseparated-literal-suffix` implied by `-D warnings`
error: float type suffix should be separated by an underscore
--> literals.rs:26:17
|
26 | let fail7 = 1.5f32;
| ^^^^^^
|
= note: `-D unseparated-literal-suffix` implied by `-D warnings`
error: this is a decimal constant
--> literals.rs:30:17
@ -88,13 +74,12 @@ error: this is a decimal constant
30 | let fail8 = 0123;
| ^^^^
|
= note: `-D zero-prefixed-literal` implied by `-D warnings`
help: if you mean to use a decimal constant, remove the `0` to remove confusion:
| let fail8 = 123;
help: if you mean to use an octal constant, use `0o`:
| let fail8 = 0o123;
error: aborting due to previous error(s)
error: aborting due to 11 previous errors
To learn more, run the command again with --verbose.

View file

@ -14,7 +14,6 @@ error: you seem to be using .map() to clone the contents of an iterator, conside
14 | x.iter().map(|&y| y);
| ^^^^^^^^^^^^^^^^^^^^
|
= note: `-D map-clone` implied by `-D warnings`
= help: try
x.iter().cloned()
@ -24,7 +23,6 @@ error: you seem to be using .map() to clone the contents of an iterator, conside
16 | x.iter().map(|y| *y);
| ^^^^^^^^^^^^^^^^^^^^
|
= note: `-D map-clone` implied by `-D warnings`
= help: try
x.iter().cloned()
@ -34,7 +32,6 @@ error: you seem to be using .map() to clone the contents of an iterator, conside
18 | x.iter().map(|y| { y.clone() });
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D map-clone` implied by `-D warnings`
= help: try
x.iter().cloned()
@ -44,7 +41,6 @@ error: you seem to be using .map() to clone the contents of an iterator, conside
20 | x.iter().map(|&y| { y });
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D map-clone` implied by `-D warnings`
= help: try
x.iter().cloned()
@ -54,7 +50,6 @@ error: you seem to be using .map() to clone the contents of an iterator, conside
22 | x.iter().map(|y| { *y });
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D map-clone` implied by `-D warnings`
= help: try
x.iter().cloned()
@ -64,7 +59,6 @@ error: you seem to be using .map() to clone the contents of an iterator, conside
24 | x.iter().map(Clone::clone);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D map-clone` implied by `-D warnings`
= help: try
x.iter().cloned()
@ -74,7 +68,6 @@ error: you seem to be using .map() to clone the contents of an Option, consider
30 | x.as_ref().map(|y| y.clone());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D map-clone` implied by `-D warnings`
= help: try
x.as_ref().cloned()
@ -84,7 +77,6 @@ error: you seem to be using .map() to clone the contents of an Option, consider
32 | x.as_ref().map(|&y| y);
| ^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D map-clone` implied by `-D warnings`
= help: try
x.as_ref().cloned()
@ -94,7 +86,6 @@ error: you seem to be using .map() to clone the contents of an Option, consider
34 | x.as_ref().map(|y| *y);
| ^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D map-clone` implied by `-D warnings`
= help: try
x.as_ref().cloned()
@ -104,11 +95,10 @@ error: you seem to be using .map() to clone the contents of an Option, consider
90 | let _: Option<UnusualDeref> = x.as_ref().map(|y| *y);
| ^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D map-clone` implied by `-D warnings`
= help: try
x.as_ref().cloned()
error: aborting due to previous error(s)
error: aborting due to 11 previous errors
To learn more, run the command again with --verbose.

View file

@ -28,8 +28,6 @@ error: you seem to be trying to use match for destructuring a single pattern. Co
43 | | _ => {}
44 | | };
| |_____^ help: try this `if let (2...3, 7...9) = z { dummy() }`
|
= note: `-D single-match` implied by `-D warnings`
error: you seem to be trying to use match for destructuring a single pattern. Consider using `if let`
--> matches.rs:63:5
@ -39,8 +37,6 @@ error: you seem to be trying to use match for destructuring a single pattern. Co
65 | | None => ()
66 | | };
| |_____^ help: try this `if let Some(y) = x { dummy() }`
|
= note: `-D single-match` implied by `-D warnings`
error: you seem to be trying to use match for destructuring a single pattern. Consider using `if let`
--> matches.rs:68:5
@ -50,8 +46,6 @@ error: you seem to be trying to use match for destructuring a single pattern. Co
70 | | Err(..) => ()
71 | | };
| |_____^ help: try this `if let Ok(y) = y { dummy() }`
|
= note: `-D single-match` implied by `-D warnings`
error: you seem to be trying to use match for destructuring a single pattern. Consider using `if let`
--> matches.rs:75:5
@ -61,8 +55,6 @@ error: you seem to be trying to use match for destructuring a single pattern. Co
77 | | Cow::Owned(..) => (),
78 | | };
| |_____^ help: try this `if let Cow::Borrowed(..) = c { dummy() }`
|
= note: `-D single-match` implied by `-D warnings`
error: you seem to be trying to match on a boolean expression
--> matches.rs:96:5
@ -83,8 +75,6 @@ error: you seem to be trying to match on a boolean expression
104 | | false => 0,
105 | | };
| |_____^ help: consider using an if/else expression `if option == 1 { 1 } else { 0 }`
|
= note: `-D match-bool` implied by `-D warnings`
error: you seem to be trying to match on a boolean expression
--> matches.rs:107:5
@ -94,8 +84,6 @@ error: you seem to be trying to match on a boolean expression
109 | | false => { println!("Noooo!"); }
110 | | };
| |_____^ help: consider using an if/else expression `if !test { println!("Noooo!"); }`
|
= note: `-D match-bool` implied by `-D warnings`
error: you seem to be trying to match on a boolean expression
--> matches.rs:112:5
@ -105,8 +93,6 @@ error: you seem to be trying to match on a boolean expression
114 | | _ => (),
115 | | };
| |_____^ help: consider using an if/else expression `if !test { println!("Noooo!"); }`
|
= note: `-D match-bool` implied by `-D warnings`
error: you seem to be trying to match on a boolean expression
--> matches.rs:117:5
@ -116,8 +102,6 @@ error: you seem to be trying to match on a boolean expression
119 | | _ => (),
120 | | };
| |_____^ help: consider using an if/else expression `if !(test && test) { println!("Noooo!"); }`
|
= note: `-D match-bool` implied by `-D warnings`
error: equal expressions as operands to `&&`
--> matches.rs:117:11
@ -135,8 +119,6 @@ error: you seem to be trying to match on a boolean expression
124 | | true => { println!("Yes!"); }
125 | | };
| |_____^ help: consider using an if/else expression `if test { println!("Yes!"); } else { println!("Noooo!"); }`
|
= note: `-D match-bool` implied by `-D warnings`
error: you don't need to add `&` to all patterns
--> matches.rs:138:9
@ -160,7 +142,6 @@ error: you don't need to add `&` to all patterns
151 | | }
| |_____^
|
= note: `-D match-ref-pats` implied by `-D warnings`
help: instead of prefixing all patterns with `&`, you can dereference the expression
| match *tup { .. }
@ -172,8 +153,6 @@ error: you don't need to add `&` to both the expression and the patterns
156 | | &None => println!("none"),
157 | | }
| |_____^ help: try `match w { .. }`
|
= note: `-D match-ref-pats` implied by `-D warnings`
error: you don't need to add `&` to all patterns
--> matches.rs:165:5
@ -183,7 +162,6 @@ error: you don't need to add `&` to all patterns
167 | | }
| |_____^
|
= note: `-D match-ref-pats` implied by `-D warnings`
help: instead of prefixing all patterns with `&`, you can dereference the expression
| if let .. = *a { .. }
@ -194,8 +172,6 @@ error: you don't need to add `&` to both the expression and the patterns
171 | | println!("none");
172 | | }
| |_____^ help: try `if let .. = b { .. }`
|
= note: `-D match-ref-pats` implied by `-D warnings`
error: some ranges overlap
--> matches.rs:179:9
@ -216,7 +192,6 @@ error: some ranges overlap
185 | 0 ... 5 => println!("0 ... 5"),
| ^^^^^^^
|
= note: `-D match-overlapping-arm` implied by `-D warnings`
note: overlaps with this
--> matches.rs:187:9
|
@ -229,7 +204,6 @@ error: some ranges overlap
193 | 0 ... 5 => println!("0 ... 5"),
| ^^^^^^^
|
= note: `-D match-overlapping-arm` implied by `-D warnings`
note: overlaps with this
--> matches.rs:192:9
|
@ -242,7 +216,6 @@ error: some ranges overlap
199 | 0 ... 2 => println!("0 ... 2"),
| ^^^^^^^
|
= note: `-D match-overlapping-arm` implied by `-D warnings`
note: overlaps with this
--> matches.rs:198:9
|
@ -255,7 +228,6 @@ error: some ranges overlap
222 | 0 .. 11 => println!("0 .. 11"),
| ^^^^^^^
|
= note: `-D match-overlapping-arm` implied by `-D warnings`
note: overlaps with this
--> matches.rs:223:9
|
@ -277,7 +249,6 @@ error: Err(_) will match all errors, maybe not a good idea
246 | Err(_) => {panic!()}
| ^^^^^^
|
= note: `-D match-wild-err-arm` implied by `-D warnings`
= note: to remove this warning, match each error seperately or use unreachable macro
error: Err(_) will match all errors, maybe not a good idea
@ -286,10 +257,9 @@ error: Err(_) will match all errors, maybe not a good idea
252 | Err(_) => {panic!();}
| ^^^^^^
|
= note: `-D match-wild-err-arm` implied by `-D warnings`
= note: to remove this warning, match each error seperately or use unreachable macro
error: aborting due to previous error(s)
error: aborting due to 26 previous errors
To learn more, run the command again with --verbose.

View file

@ -11,18 +11,14 @@ error: usage of mem::forget on Drop type
|
21 | std::mem::forget(seven);
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D mem-forget` implied by `-D warnings`
error: usage of mem::forget on Drop type
--> mem_forget.rs:24:5
|
24 | forgetSomething(eight);
| ^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D mem-forget` implied by `-D warnings`
error: aborting due to previous error(s)
error: aborting due to 3 previous errors
To learn more, run the command again with --verbose.

View file

@ -11,8 +11,6 @@ error: defining a method called `drop` on this type; consider implementing the `
|
19 | fn drop(&mut self) { }
| ^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D should-implement-trait` implied by `-D warnings`
error: methods called `into_*` usually take self by value; consider choosing a less ambiguous name
--> methods.rs:26:17
@ -27,16 +25,12 @@ error: methods called `to_*` usually take self by reference; consider choosing a
|
28 | fn to_something(self) -> u32 { 0 }
| ^^^^
|
= note: `-D wrong-self-convention` implied by `-D warnings`
error: methods called `new` usually take no self; consider choosing a less ambiguous name
--> methods.rs:30:12
|
30 | fn new(self) {}
| ^^^^
|
= note: `-D wrong-self-convention` implied by `-D warnings`
error: methods called `new` usually return `Self`
--> methods.rs:30:5
@ -67,8 +61,6 @@ error: called `map(f).unwrap_or(a)` on an Option value. This can be done more di
103 | | }
104 | | ).unwrap_or(0);
| |____________________________^
|
= note: `-D option-map-unwrap-or` implied by `-D warnings`
error: called `map(f).unwrap_or(a)` on an Option value. This can be done more directly by calling `map_or(a, f)` instead
--> methods.rs:105:13
@ -79,8 +71,6 @@ error: called `map(f).unwrap_or(a)` on an Option value. This can be done more di
107 | | 0
108 | | });
| |__________________^
|
= note: `-D option-map-unwrap-or` implied by `-D warnings`
error: called `map(f).unwrap_or_else(g)` on an Option value. This can be done more directly by calling `map_or_else(g, f)` instead
--> methods.rs:114:13
@ -103,8 +93,6 @@ error: called `map(f).unwrap_or_else(g)` on an Option value. This can be done mo
120 | | }
121 | | ).unwrap_or_else(|| 0);
| |____________________________________^
|
= note: `-D option-map-unwrap-or-else` implied by `-D warnings`
error: called `map(f).unwrap_or_else(g)` on an Option value. This can be done more directly by calling `map_or_else(g, f)` instead
--> methods.rs:122:13
@ -115,8 +103,6 @@ error: called `map(f).unwrap_or_else(g)` on an Option value. This can be done mo
124 | | 0
125 | | );
| |_________________^
|
= note: `-D option-map-unwrap-or-else` implied by `-D warnings`
error: called `filter(p).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(p)` instead.
--> methods.rs:194:13
@ -136,8 +122,6 @@ error: called `filter(p).next()` on an `Iterator`. This is more succinctly expre
199 | | }
200 | | ).next();
| |___________________________^
|
= note: `-D filter-next` implied by `-D warnings`
error: called `is_some()` after searching an `Iterator` with find. This is more succinctly expressed by calling `any()`.
--> methods.rs:212:13
@ -157,8 +141,6 @@ error: called `is_some()` after searching an `Iterator` with find. This is more
217 | | }
218 | | ).is_some();
| |______________________________^
|
= note: `-D search-is-some` implied by `-D warnings`
error: called `is_some()` after searching an `Iterator` with position. This is more succinctly expressed by calling `any()`.
--> methods.rs:221:13
@ -166,7 +148,6 @@ error: called `is_some()` after searching an `Iterator` with position. This is m
221 | let _ = v.iter().position(|&x| x < 0).is_some();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D search-is-some` implied by `-D warnings`
= note: replace `position(|&x| x < 0).is_some()` with `any(|&x| x < 0)`
error: called `is_some()` after searching an `Iterator` with position. This is more succinctly expressed by calling `any()`.
@ -178,8 +159,6 @@ error: called `is_some()` after searching an `Iterator` with position. This is m
226 | | }
227 | | ).is_some();
| |______________________________^
|
= note: `-D search-is-some` implied by `-D warnings`
error: called `is_some()` after searching an `Iterator` with rposition. This is more succinctly expressed by calling `any()`.
--> methods.rs:230:13
@ -187,7 +166,6 @@ error: called `is_some()` after searching an `Iterator` with rposition. This is
230 | let _ = v.iter().rposition(|&x| x < 0).is_some();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D search-is-some` implied by `-D warnings`
= note: replace `rposition(|&x| x < 0).is_some()` with `any(|&x| x < 0)`
error: called `is_some()` after searching an `Iterator` with rposition. This is more succinctly expressed by calling `any()`.
@ -199,8 +177,6 @@ error: called `is_some()` after searching an `Iterator` with rposition. This is
235 | | }
236 | | ).is_some();
| |______________________________^
|
= note: `-D search-is-some` implied by `-D warnings`
error: use of `unwrap_or` followed by a function call
--> methods.rs:268:5
@ -215,88 +191,66 @@ error: use of `unwrap_or` followed by a call to `new`
|
271 | with_new.unwrap_or(Vec::new());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this `with_new.unwrap_or_default()`
|
= note: `-D or-fun-call` implied by `-D warnings`
error: use of `unwrap_or` followed by a function call
--> methods.rs:274:5
|
274 | with_const_args.unwrap_or(Vec::with_capacity(12));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this `with_const_args.unwrap_or_else(|| Vec::with_capacity(12))`
|
= note: `-D or-fun-call` implied by `-D warnings`
error: use of `unwrap_or` followed by a function call
--> methods.rs:277:5
|
277 | with_err.unwrap_or(make());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this `with_err.unwrap_or_else(|_| make())`
|
= note: `-D or-fun-call` implied by `-D warnings`
error: use of `unwrap_or` followed by a function call
--> methods.rs:280:5
|
280 | with_err_args.unwrap_or(Vec::with_capacity(12));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this `with_err_args.unwrap_or_else(|_| Vec::with_capacity(12))`
|
= note: `-D or-fun-call` implied by `-D warnings`
error: use of `unwrap_or` followed by a call to `default`
--> methods.rs:283:5
|
283 | with_default_trait.unwrap_or(Default::default());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this `with_default_trait.unwrap_or_default()`
|
= note: `-D or-fun-call` implied by `-D warnings`
error: use of `unwrap_or` followed by a call to `default`
--> methods.rs:286:5
|
286 | with_default_type.unwrap_or(u64::default());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this `with_default_type.unwrap_or_default()`
|
= note: `-D or-fun-call` implied by `-D warnings`
error: use of `unwrap_or` followed by a function call
--> methods.rs:289:5
|
289 | with_vec.unwrap_or(vec![]);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this `with_vec.unwrap_or_else(|| < [ _ ] > :: into_vec ( box [ $ ( $ x ) , * ] ))`
|
= note: `-D or-fun-call` implied by `-D warnings`
error: use of `unwrap_or` followed by a function call
--> methods.rs:294:5
|
294 | without_default.unwrap_or(Foo::new());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this `without_default.unwrap_or_else(Foo::new)`
|
= note: `-D or-fun-call` implied by `-D warnings`
error: use of `or_insert` followed by a function call
--> methods.rs:297:5
|
297 | map.entry(42).or_insert(String::new());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this `map.entry(42).or_insert_with(String::new)`
|
= note: `-D or-fun-call` implied by `-D warnings`
error: use of `or_insert` followed by a function call
--> methods.rs:300:5
|
300 | btree.entry(42).or_insert(String::new());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this `btree.entry(42).or_insert_with(String::new)`
|
= note: `-D or-fun-call` implied by `-D warnings`
error: use of `unwrap_or` followed by a function call
--> methods.rs:303:13
|
303 | let _ = stringy.unwrap_or("".to_owned());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this `stringy.unwrap_or_else(|| "".to_owned())`
|
= note: `-D or-fun-call` implied by `-D warnings`
error: called `.iter().nth()` on a Vec. Calling `.get()` is both faster and more readable
--> methods.rs:314:23
@ -311,48 +265,36 @@ error: called `.iter().nth()` on a slice. Calling `.get()` is both faster and mo
|
315 | let bad_slice = &some_vec[..].iter().nth(3);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D iter-nth` implied by `-D warnings`
error: called `.iter().nth()` on a slice. Calling `.get()` is both faster and more readable
--> methods.rs:316:31
|
316 | let bad_boxed_slice = boxed_slice.iter().nth(3);
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D iter-nth` implied by `-D warnings`
error: called `.iter().nth()` on a VecDeque. Calling `.get()` is both faster and more readable
--> methods.rs:317:29
|
317 | let bad_vec_deque = some_vec_deque.iter().nth(3);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D iter-nth` implied by `-D warnings`
error: called `.iter_mut().nth()` on a Vec. Calling `.get_mut()` is both faster and more readable
--> methods.rs:322:23
|
322 | let bad_vec = some_vec.iter_mut().nth(3);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D iter-nth` implied by `-D warnings`
error: called `.iter_mut().nth()` on a slice. Calling `.get_mut()` is both faster and more readable
--> methods.rs:325:26
|
325 | let bad_slice = &some_vec[..].iter_mut().nth(3);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D iter-nth` implied by `-D warnings`
error: called `.iter_mut().nth()` on a VecDeque. Calling `.get_mut()` is both faster and more readable
--> methods.rs:328:29
|
328 | let bad_vec_deque = some_vec_deque.iter_mut().nth(3);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D iter-nth` implied by `-D warnings`
error: called `skip(x).next()` on an iterator. This is more succinctly expressed by calling `nth(x)`
--> methods.rs:340:13
@ -367,24 +309,18 @@ error: called `skip(x).next()` on an iterator. This is more succinctly expressed
|
341 | let _ = some_vec.iter().cycle().skip(42).next();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D iter-skip-next` implied by `-D warnings`
error: called `skip(x).next()` on an iterator. This is more succinctly expressed by calling `nth(x)`
--> methods.rs:342:13
|
342 | let _ = (1..10).skip(10).next();
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D iter-skip-next` implied by `-D warnings`
error: called `skip(x).next()` on an iterator. This is more succinctly expressed by calling `nth(x)`
--> methods.rs:343:14
|
343 | let _ = &some_vec[..].iter().skip(3).next();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D iter-skip-next` implied by `-D warnings`
error: called `.get().unwrap()` on a slice. Using `[]` is more clear and more concise
--> methods.rs:369:17
@ -399,72 +335,54 @@ error: called `.get().unwrap()` on a slice. Using `[]` is more clear and more co
|
370 | let _ = some_slice.get(0).unwrap();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this `&some_slice[0]`
|
= note: `-D get-unwrap` implied by `-D warnings`
error: called `.get().unwrap()` on a Vec. Using `[]` is more clear and more concise
--> methods.rs:371:17
|
371 | let _ = some_vec.get(0).unwrap();
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try this `&some_vec[0]`
|
= note: `-D get-unwrap` implied by `-D warnings`
error: called `.get().unwrap()` on a VecDeque. Using `[]` is more clear and more concise
--> methods.rs:372:17
|
372 | let _ = some_vecdeque.get(0).unwrap();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this `&some_vecdeque[0]`
|
= note: `-D get-unwrap` implied by `-D warnings`
error: called `.get().unwrap()` on a HashMap. Using `[]` is more clear and more concise
--> methods.rs:373:17
|
373 | let _ = some_hashmap.get(&1).unwrap();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this `&some_hashmap[&1]`
|
= note: `-D get-unwrap` implied by `-D warnings`
error: called `.get().unwrap()` on a BTreeMap. Using `[]` is more clear and more concise
--> methods.rs:374:17
|
374 | let _ = some_btreemap.get(&1).unwrap();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this `&some_btreemap[&1]`
|
= note: `-D get-unwrap` implied by `-D warnings`
error: called `.get_mut().unwrap()` on a slice. Using `[]` is more clear and more concise
--> methods.rs:379:10
|
379 | *boxed_slice.get_mut(0).unwrap() = 1;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this `&mut boxed_slice[0]`
|
= note: `-D get-unwrap` implied by `-D warnings`
error: called `.get_mut().unwrap()` on a slice. Using `[]` is more clear and more concise
--> methods.rs:380:10
|
380 | *some_slice.get_mut(0).unwrap() = 1;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this `&mut some_slice[0]`
|
= note: `-D get-unwrap` implied by `-D warnings`
error: called `.get_mut().unwrap()` on a Vec. Using `[]` is more clear and more concise
--> methods.rs:381:10
|
381 | *some_vec.get_mut(0).unwrap() = 1;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this `&mut some_vec[0]`
|
= note: `-D get-unwrap` implied by `-D warnings`
error: called `.get_mut().unwrap()` on a VecDeque. Using `[]` is more clear and more concise
--> methods.rs:382:10
|
382 | *some_vecdeque.get_mut(0).unwrap() = 1;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this `&mut some_vecdeque[0]`
|
= note: `-D get-unwrap` implied by `-D warnings`
error: used unwrap() on an Option value. If you don't want to handle the None case gracefully, consider using expect() to provide a better panic message
--> methods.rs:396:13
@ -495,32 +413,24 @@ error: called `ok().expect()` on a Result value. You can call `expect` directly
|
407 | res3.ok().expect("whoof");
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D ok-expect` implied by `-D warnings`
error: called `ok().expect()` on a Result value. You can call `expect` directly on the `Result`
--> methods.rs:409:5
|
409 | res4.ok().expect("argh");
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D ok-expect` implied by `-D warnings`
error: called `ok().expect()` on a Result value. You can call `expect` directly on the `Result`
--> methods.rs:411:5
|
411 | res5.ok().expect("oops");
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D ok-expect` implied by `-D warnings`
error: called `ok().expect()` on a Result value. You can call `expect` directly on the `Result`
--> methods.rs:413:5
|
413 | res6.ok().expect("meh");
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D ok-expect` implied by `-D warnings`
error: you should use the `starts_with` method
--> methods.rs:425:5
@ -535,8 +445,6 @@ error: you should use the `starts_with` method
|
426 | Some(' ') != "".chars().next();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this `!"".starts_with(' ')`
|
= note: `-D chars-next-cmp` implied by `-D warnings`
error: calling `.extend(_.chars())`
--> methods.rs:435:5
@ -551,16 +459,12 @@ error: calling `.extend(_.chars())`
|
438 | s.extend("abc".chars());
| ^^^^^^^^^^^^^^^^^^^^^^^ help: try this `s.push_str("abc")`
|
= note: `-D string-extend-chars` implied by `-D warnings`
error: calling `.extend(_.chars())`
--> methods.rs:441:5
|
441 | s.extend(def.chars());
| ^^^^^^^^^^^^^^^^^^^^^ help: try this `s.push_str(&def)`
|
= note: `-D string-extend-chars` implied by `-D warnings`
error: using `clone` on a `Copy` type
--> methods.rs:452:5
@ -575,24 +479,18 @@ error: using `clone` on a `Copy` type
|
456 | (&42).clone();
| ^^^^^^^^^^^^^ help: try dereferencing it `*(&42)`
|
= note: `-D clone-on-copy` implied by `-D warnings`
error: using `clone` on a `Copy` type
--> methods.rs:460:5
|
460 | t.clone();
| ^^^^^^^^^ help: try removing the `clone` call `t`
|
= note: `-D clone-on-copy` implied by `-D warnings`
error: using `clone` on a `Copy` type
--> methods.rs:462:5
|
462 | Some(t).clone();
| ^^^^^^^^^^^^^^^ help: try removing the `clone` call `Some(t)`
|
= note: `-D clone-on-copy` implied by `-D warnings`
error: using `clone` on a double-reference; this will copy the reference instead of cloning the inner type
--> methods.rs:468:22
@ -615,128 +513,96 @@ error: single-character string constant used as pattern
|
492 | x.contains("x");
| -----------^^^- help: try using a char instead: `x.contains('x')`
|
= note: `-D single-char-pattern` implied by `-D warnings`
error: single-character string constant used as pattern
--> methods.rs:493:19
|
493 | x.starts_with("x");
| --------------^^^- help: try using a char instead: `x.starts_with('x')`
|
= note: `-D single-char-pattern` implied by `-D warnings`
error: single-character string constant used as pattern
--> methods.rs:494:17
|
494 | x.ends_with("x");
| ------------^^^- help: try using a char instead: `x.ends_with('x')`
|
= note: `-D single-char-pattern` implied by `-D warnings`
error: single-character string constant used as pattern
--> methods.rs:495:12
|
495 | x.find("x");
| -------^^^- help: try using a char instead: `x.find('x')`
|
= note: `-D single-char-pattern` implied by `-D warnings`
error: single-character string constant used as pattern
--> methods.rs:496:13
|
496 | x.rfind("x");
| --------^^^- help: try using a char instead: `x.rfind('x')`
|
= note: `-D single-char-pattern` implied by `-D warnings`
error: single-character string constant used as pattern
--> methods.rs:497:14
|
497 | x.rsplit("x");
| ---------^^^- help: try using a char instead: `x.rsplit('x')`
|
= note: `-D single-char-pattern` implied by `-D warnings`
error: single-character string constant used as pattern
--> methods.rs:498:24
|
498 | x.split_terminator("x");
| -------------------^^^- help: try using a char instead: `x.split_terminator('x')`
|
= note: `-D single-char-pattern` implied by `-D warnings`
error: single-character string constant used as pattern
--> methods.rs:499:25
|
499 | x.rsplit_terminator("x");
| --------------------^^^- help: try using a char instead: `x.rsplit_terminator('x')`
|
= note: `-D single-char-pattern` implied by `-D warnings`
error: single-character string constant used as pattern
--> methods.rs:500:17
|
500 | x.splitn(0, "x");
| ------------^^^- help: try using a char instead: `x.splitn(0, 'x')`
|
= note: `-D single-char-pattern` implied by `-D warnings`
error: single-character string constant used as pattern
--> methods.rs:501:18
|
501 | x.rsplitn(0, "x");
| -------------^^^- help: try using a char instead: `x.rsplitn(0, 'x')`
|
= note: `-D single-char-pattern` implied by `-D warnings`
error: single-character string constant used as pattern
--> methods.rs:502:15
|
502 | x.matches("x");
| ----------^^^- help: try using a char instead: `x.matches('x')`
|
= note: `-D single-char-pattern` implied by `-D warnings`
error: single-character string constant used as pattern
--> methods.rs:503:16
|
503 | x.rmatches("x");
| -----------^^^- help: try using a char instead: `x.rmatches('x')`
|
= note: `-D single-char-pattern` implied by `-D warnings`
error: single-character string constant used as pattern
--> methods.rs:504:21
|
504 | x.match_indices("x");
| ----------------^^^- help: try using a char instead: `x.match_indices('x')`
|
= note: `-D single-char-pattern` implied by `-D warnings`
error: single-character string constant used as pattern
--> methods.rs:505:22
|
505 | x.rmatch_indices("x");
| -----------------^^^- help: try using a char instead: `x.rmatch_indices('x')`
|
= note: `-D single-char-pattern` implied by `-D warnings`
error: single-character string constant used as pattern
--> methods.rs:506:25
|
506 | x.trim_left_matches("x");
| --------------------^^^- help: try using a char instead: `x.trim_left_matches('x')`
|
= note: `-D single-char-pattern` implied by `-D warnings`
error: single-character string constant used as pattern
--> methods.rs:507:26
|
507 | x.trim_right_matches("x");
| ---------------------^^^- help: try using a char instead: `x.trim_right_matches('x')`
|
= note: `-D single-char-pattern` implied by `-D warnings`
error: you are getting the inner pointer of a temporary `CString`
--> methods.rs:517:5
@ -760,7 +626,7 @@ error: called `cloned().collect()` on a slice to create a `Vec`. Calling `to_vec
|
= note: `-D iter-cloned-collect` implied by `-D warnings`
error: aborting due to previous error(s)
error: aborting due to 89 previous errors
To learn more, run the command again with --verbose.

View file

@ -11,50 +11,38 @@ error: this min/max combination leads to constant result
|
16 | min(max(3, x), 1);
| ^^^^^^^^^^^^^^^^^
|
= note: `-D min-max` implied by `-D warnings`
error: this min/max combination leads to constant result
--> min_max.rs:17:5
|
17 | max(min(x, 1), 3);
| ^^^^^^^^^^^^^^^^^
|
= note: `-D min-max` implied by `-D warnings`
error: this min/max combination leads to constant result
--> min_max.rs:18:5
|
18 | max(3, min(x, 1));
| ^^^^^^^^^^^^^^^^^
|
= note: `-D min-max` implied by `-D warnings`
error: this min/max combination leads to constant result
--> min_max.rs:20:5
|
20 | my_max(3, my_min(x, 1));
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D min-max` implied by `-D warnings`
error: this min/max combination leads to constant result
--> min_max.rs:29:5
|
29 | min("Apple", max("Zoo", s));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D min-max` implied by `-D warnings`
error: this min/max combination leads to constant result
--> min_max.rs:30:5
|
30 | max(min(s, "Apple"), "Zoo");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D min-max` implied by `-D warnings`
error: aborting due to previous error(s)
error: aborting due to 7 previous errors
To learn more, run the command again with --verbose.

View file

@ -11,8 +11,6 @@ error: missing documentation for a type alias
|
27 | pub type PubTypedef = String;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D missing-docs-in-private-items` implied by `-D warnings`
error: missing documentation for a struct
--> missing-doc.rs:29:1
@ -22,24 +20,18 @@ error: missing documentation for a struct
31 | | b: isize,
32 | | }
| |_^
|
= note: `-D missing-docs-in-private-items` implied by `-D warnings`
error: missing documentation for a struct field
--> missing-doc.rs:30:5
|
30 | a: isize,
| ^^^^^^^^
|
= note: `-D missing-docs-in-private-items` implied by `-D warnings`
error: missing documentation for a struct field
--> missing-doc.rs:31:5
|
31 | b: isize,
| ^^^^^^^^
|
= note: `-D missing-docs-in-private-items` implied by `-D warnings`
error: missing documentation for a struct
--> missing-doc.rs:34:1
@ -49,56 +41,42 @@ error: missing documentation for a struct
36 | | b: isize,
37 | | }
| |_^
|
= note: `-D missing-docs-in-private-items` implied by `-D warnings`
error: missing documentation for a struct field
--> missing-doc.rs:35:5
|
35 | pub a: isize,
| ^^^^^^^^^^^^
|
= note: `-D missing-docs-in-private-items` implied by `-D warnings`
error: missing documentation for a struct field
--> missing-doc.rs:36:5
|
36 | b: isize,
| ^^^^^^^^
|
= note: `-D missing-docs-in-private-items` implied by `-D warnings`
error: missing documentation for a module
--> missing-doc.rs:45:1
|
45 | mod module_no_dox {}
| ^^^^^^^^^^^^^^^^^^^^
|
= note: `-D missing-docs-in-private-items` implied by `-D warnings`
error: missing documentation for a module
--> missing-doc.rs:46:1
|
46 | pub mod pub_module_no_dox {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D missing-docs-in-private-items` implied by `-D warnings`
error: missing documentation for a function
--> missing-doc.rs:50:1
|
50 | pub fn foo2() {}
| ^^^^^^^^^^^^^^^^
|
= note: `-D missing-docs-in-private-items` implied by `-D warnings`
error: missing documentation for a function
--> missing-doc.rs:51:1
|
51 | fn foo3() {}
| ^^^^^^^^^^^^
|
= note: `-D missing-docs-in-private-items` implied by `-D warnings`
error: missing documentation for a trait
--> missing-doc.rs:68:1
@ -108,72 +86,54 @@ error: missing documentation for a trait
70 | | fn foo_with_impl(&self) {}
71 | | }
| |_^
|
= note: `-D missing-docs-in-private-items` implied by `-D warnings`
error: missing documentation for a trait method
--> missing-doc.rs:69:5
|
69 | fn foo(&self);
| ^^^^^^^^^^^^^^
|
= note: `-D missing-docs-in-private-items` implied by `-D warnings`
error: missing documentation for a trait method
--> missing-doc.rs:70:5
|
70 | fn foo_with_impl(&self) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D missing-docs-in-private-items` implied by `-D warnings`
error: missing documentation for an associated type
--> missing-doc.rs:80:5
|
80 | type AssociatedType;
| ^^^^^^^^^^^^^^^^^^^^
|
= note: `-D missing-docs-in-private-items` implied by `-D warnings`
error: missing documentation for an associated type
--> missing-doc.rs:81:5
|
81 | type AssociatedTypeDef = Self;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D missing-docs-in-private-items` implied by `-D warnings`
error: missing documentation for a method
--> missing-doc.rs:92:5
|
92 | pub fn foo() {}
| ^^^^^^^^^^^^^^^
|
= note: `-D missing-docs-in-private-items` implied by `-D warnings`
error: missing documentation for a method
--> missing-doc.rs:93:5
|
93 | fn bar() {}
| ^^^^^^^^^^^
|
= note: `-D missing-docs-in-private-items` implied by `-D warnings`
error: missing documentation for a method
--> missing-doc.rs:97:5
|
97 | pub fn foo() {}
| ^^^^^^^^^^^^^^^
|
= note: `-D missing-docs-in-private-items` implied by `-D warnings`
error: missing documentation for a method
--> missing-doc.rs:100:5
|
100 | fn foo2() {}
| ^^^^^^^^^^^^
|
= note: `-D missing-docs-in-private-items` implied by `-D warnings`
error: missing documentation for an enum
--> missing-doc.rs:126:1
@ -186,8 +146,6 @@ error: missing documentation for an enum
131 | | BarB
132 | | }
| |_^
|
= note: `-D missing-docs-in-private-items` implied by `-D warnings`
error: missing documentation for a variant
--> missing-doc.rs:127:5
@ -197,32 +155,24 @@ error: missing documentation for a variant
129 | | b: isize
130 | | },
| |_____^
|
= note: `-D missing-docs-in-private-items` implied by `-D warnings`
error: missing documentation for a struct field
--> missing-doc.rs:128:9
|
128 | a: isize,
| ^^^^^^^^
|
= note: `-D missing-docs-in-private-items` implied by `-D warnings`
error: missing documentation for a struct field
--> missing-doc.rs:129:9
|
129 | b: isize
| ^^^^^^^^
|
= note: `-D missing-docs-in-private-items` implied by `-D warnings`
error: missing documentation for a variant
--> missing-doc.rs:131:5
|
131 | BarB
| ^^^^
|
= note: `-D missing-docs-in-private-items` implied by `-D warnings`
error: missing documentation for an enum
--> missing-doc.rs:134:1
@ -233,8 +183,6 @@ error: missing documentation for an enum
137 | | },
138 | | }
| |_^
|
= note: `-D missing-docs-in-private-items` implied by `-D warnings`
error: missing documentation for a variant
--> missing-doc.rs:135:5
@ -243,48 +191,36 @@ error: missing documentation for a variant
136 | | a: isize,
137 | | },
| |_____^
|
= note: `-D missing-docs-in-private-items` implied by `-D warnings`
error: missing documentation for a struct field
--> missing-doc.rs:136:9
|
136 | a: isize,
| ^^^^^^^^
|
= note: `-D missing-docs-in-private-items` implied by `-D warnings`
error: missing documentation for a constant
--> missing-doc.rs:160:1
|
160 | const FOO: u32 = 0;
| ^^^^^^^^^^^^^^^^^^^
|
= note: `-D missing-docs-in-private-items` implied by `-D warnings`
error: missing documentation for a constant
--> missing-doc.rs:167:1
|
167 | pub const FOO4: u32 = 0;
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D missing-docs-in-private-items` implied by `-D warnings`
error: missing documentation for a static
--> missing-doc.rs:170:1
|
170 | static BAR: u32 = 0;
| ^^^^^^^^^^^^^^^^^^^^
|
= note: `-D missing-docs-in-private-items` implied by `-D warnings`
error: missing documentation for a static
--> missing-doc.rs:177:1
|
177 | pub static BAR4: u32 = 0;
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D missing-docs-in-private-items` implied by `-D warnings`
error: missing documentation for a module
--> missing-doc.rs:180:1
@ -297,58 +233,44 @@ error: missing documentation for a module
192 | | }
193 | | }
| |_^
|
= note: `-D missing-docs-in-private-items` implied by `-D warnings`
error: missing documentation for a function
--> missing-doc.rs:183:5
|
183 | pub fn undocumented1() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D missing-docs-in-private-items` implied by `-D warnings`
error: missing documentation for a function
--> missing-doc.rs:184:5
|
184 | pub fn undocumented2() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D missing-docs-in-private-items` implied by `-D warnings`
error: missing documentation for a function
--> missing-doc.rs:185:5
|
185 | fn undocumented3() {}
| ^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D missing-docs-in-private-items` implied by `-D warnings`
error: missing documentation for a function
--> missing-doc.rs:190:9
|
190 | pub fn also_undocumented1() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D missing-docs-in-private-items` implied by `-D warnings`
error: missing documentation for a function
--> missing-doc.rs:191:9
|
191 | fn also_undocumented2() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D missing-docs-in-private-items` implied by `-D warnings`
error: missing documentation for a function
--> missing-doc.rs:202:1
|
202 | fn main() {}
| ^^^^^^^^^^^^
|
= note: `-D missing-docs-in-private-items` implied by `-D warnings`
error: aborting due to previous error(s)
error: aborting due to 40 previous errors
To learn more, run the command again with --verbose.

View file

@ -15,10 +15,8 @@ error: module has the same name as its containing module
13 | | mod bar {}
14 | | }
| |_____^
|
= note: `-D module-inception` implied by `-D warnings`
error: aborting due to previous error(s)
error: aborting due to 2 previous errors
To learn more, run the command again with --verbose.

View file

@ -6,7 +6,7 @@ error: any number modulo 1 will be 0
|
= note: `-D modulo-one` implied by `-D warnings`
error: aborting due to previous error(s)
error: aborting due to previous error
To learn more, run the command again with --verbose.

View file

@ -17,7 +17,6 @@ error: mutable borrow from immutable input(s)
15 | fn ouch(x: &Foo) -> &mut Foo;
| ^^^^^^^^
|
= note: `-D mut-from-ref` implied by `-D warnings`
note: immutable borrow here
--> mut_from_ref.rs:15:16
|
@ -30,7 +29,6 @@ error: mutable borrow from immutable input(s)
24 | fn fail(x: &u32) -> &mut u16 {
| ^^^^^^^^
|
= note: `-D mut-from-ref` implied by `-D warnings`
note: immutable borrow here
--> mut_from_ref.rs:24:12
|
@ -43,7 +41,6 @@ error: mutable borrow from immutable input(s)
28 | fn fail_lifetime<'a>(x: &'a u32, y: &mut u32) -> &'a mut u32 {
| ^^^^^^^^^^^
|
= note: `-D mut-from-ref` implied by `-D warnings`
note: immutable borrow here
--> mut_from_ref.rs:28:25
|
@ -56,14 +53,13 @@ error: mutable borrow from immutable input(s)
32 | fn fail_double<'a, 'b>(x: &'a u32, y: &'a u32, z: &'b mut u32) -> &'a mut u32 {
| ^^^^^^^^^^^
|
= note: `-D mut-from-ref` implied by `-D warnings`
note: immutable borrow here
--> mut_from_ref.rs:32:27
|
32 | fn fail_double<'a, 'b>(x: &'a u32, y: &'a u32, z: &'b mut u32) -> &'a mut u32 {
| ^^^^^^^ ^^^^^^^
error: aborting due to previous error(s)
error: aborting due to 5 previous errors
To learn more, run the command again with --verbose.

View file

@ -11,8 +11,6 @@ error: generally you want to avoid `&mut &mut _` if possible
|
24 | let mut x = &mut &mut 1u32;
| ^^^^^^^^^^^^^^
|
= note: `-D mut-mut` implied by `-D warnings`
error: generally you want to avoid `&mut &mut _` if possible
--> mut_mut.rs:19:20
@ -22,90 +20,68 @@ error: generally you want to avoid `&mut &mut _` if possible
...
39 | let mut z = mut_ptr!(&mut 3u32);
| ------------------- in this macro invocation
|
= note: `-D mut-mut` implied by `-D warnings`
error: this expression mutably borrows a mutable reference. Consider reborrowing
--> mut_mut.rs:26:21
|
26 | let mut y = &mut x;
| ^^^^^^
|
= note: `-D mut-mut` implied by `-D warnings`
error: generally you want to avoid `&mut &mut _` if possible
--> mut_mut.rs:30:17
|
30 | let y : &mut &mut u32 = &mut &mut 2;
| ^^^^^^^^^^^^^
|
= note: `-D mut-mut` implied by `-D warnings`
error: generally you want to avoid `&mut &mut _` if possible
--> mut_mut.rs:30:33
|
30 | let y : &mut &mut u32 = &mut &mut 2;
| ^^^^^^^^^^^
|
= note: `-D mut-mut` implied by `-D warnings`
error: generally you want to avoid `&mut &mut _` if possible
--> mut_mut.rs:30:17
|
30 | let y : &mut &mut u32 = &mut &mut 2;
| ^^^^^^^^^^^^^
|
= note: `-D mut-mut` implied by `-D warnings`
error: generally you want to avoid `&mut &mut _` if possible
--> mut_mut.rs:35:17
|
35 | let y : &mut &mut &mut u32 = &mut &mut &mut 2;
| ^^^^^^^^^^^^^^^^^^
|
= note: `-D mut-mut` implied by `-D warnings`
error: generally you want to avoid `&mut &mut _` if possible
--> mut_mut.rs:35:22
|
35 | let y : &mut &mut &mut u32 = &mut &mut &mut 2;
| ^^^^^^^^^^^^^
|
= note: `-D mut-mut` implied by `-D warnings`
error: generally you want to avoid `&mut &mut _` if possible
--> mut_mut.rs:35:38
|
35 | let y : &mut &mut &mut u32 = &mut &mut &mut 2;
| ^^^^^^^^^^^^^^^^
|
= note: `-D mut-mut` implied by `-D warnings`
error: generally you want to avoid `&mut &mut _` if possible
--> mut_mut.rs:35:17
|
35 | let y : &mut &mut &mut u32 = &mut &mut &mut 2;
| ^^^^^^^^^^^^^^^^^^
|
= note: `-D mut-mut` implied by `-D warnings`
error: generally you want to avoid `&mut &mut _` if possible
--> mut_mut.rs:35:22
|
35 | let y : &mut &mut &mut u32 = &mut &mut &mut 2;
| ^^^^^^^^^^^^^
|
= note: `-D mut-mut` implied by `-D warnings`
error: generally you want to avoid `&mut &mut _` if possible
--> mut_mut.rs:35:22
|
35 | let y : &mut &mut &mut u32 = &mut &mut &mut 2;
| ^^^^^^^^^^^^^
|
= note: `-D mut-mut` implied by `-D warnings`
error: aborting due to previous error(s)
error: aborting due to 13 previous errors
To learn more, run the command again with --verbose.

View file

@ -11,18 +11,14 @@ error: The function/method `as_ptr` doesn't need a mutable reference
|
24 | as_ptr(&mut 42);
| ^^^^^^^
|
= note: `-D unnecessary-mut-passed` implied by `-D warnings`
error: The function/method `takes_an_immutable_reference` doesn't need a mutable reference
--> mut_reference.rs:28:44
|
28 | my_struct.takes_an_immutable_reference(&mut 42);
| ^^^^^^^
|
= note: `-D unnecessary-mut-passed` implied by `-D warnings`
error: aborting due to previous error(s)
error: aborting due to 3 previous errors
To learn more, run the command again with --verbose.

View file

@ -11,32 +11,24 @@ error: Consider using an AtomicUsize instead of a Mutex here. If you just want t
|
10 | Mutex::new(5usize);
| ^^^^^^^^^^^^^^^^^^
|
= note: `-D mutex-atomic` implied by `-D warnings`
error: Consider using an AtomicIsize instead of a Mutex here. If you just want the locking behaviour and not the internal type, consider using Mutex<()>.
--> mutex_atomic.rs:11:5
|
11 | Mutex::new(9isize);
| ^^^^^^^^^^^^^^^^^^
|
= note: `-D mutex-atomic` implied by `-D warnings`
error: Consider using an AtomicPtr instead of a Mutex here. If you just want the locking behaviour and not the internal type, consider using Mutex<()>.
--> mutex_atomic.rs:13:5
|
13 | Mutex::new(&x as *const u32);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D mutex-atomic` implied by `-D warnings`
error: Consider using an AtomicPtr instead of a Mutex here. If you just want the locking behaviour and not the internal type, consider using Mutex<()>.
--> mutex_atomic.rs:14:5
|
14 | Mutex::new(&mut x as *mut u32);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D mutex-atomic` implied by `-D warnings`
error: Consider using an AtomicUsize instead of a Mutex here. If you just want the locking behaviour and not the internal type, consider using Mutex<()>.
--> mutex_atomic.rs:15:5
@ -51,10 +43,8 @@ error: Consider using an AtomicIsize instead of a Mutex here. If you just want t
|
16 | Mutex::new(0i32);
| ^^^^^^^^^^^^^^^^
|
= note: `-D mutex-integer` implied by `-D warnings`
error: aborting due to previous error(s)
error: aborting due to 7 previous errors
To learn more, run the command again with --verbose.

View file

@ -11,82 +11,62 @@ error: this if-then-else expression will always return false
|
10 | if x { false } else { false };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D needless-bool` implied by `-D warnings`
error: this if-then-else expression returns a bool literal
--> needless_bool.rs:11:5
|
11 | if x { true } else { false };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to `x`
|
= note: `-D needless-bool` implied by `-D warnings`
error: this if-then-else expression returns a bool literal
--> needless_bool.rs:12:5
|
12 | if x { false } else { true };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to `!x`
|
= note: `-D needless-bool` implied by `-D warnings`
error: this if-then-else expression returns a bool literal
--> needless_bool.rs:13:5
|
13 | if x && y { false } else { true };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to `!(x && y)`
|
= note: `-D needless-bool` implied by `-D warnings`
error: this if-then-else expression will always return true
--> needless_bool.rs:25:5
|
25 | if x { return true } else { return true };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D needless-bool` implied by `-D warnings`
error: this if-then-else expression will always return false
--> needless_bool.rs:30:5
|
30 | if x { return false } else { return false };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D needless-bool` implied by `-D warnings`
error: this if-then-else expression returns a bool literal
--> needless_bool.rs:35:5
|
35 | if x { return true } else { return false };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to `return x`
|
= note: `-D needless-bool` implied by `-D warnings`
error: this if-then-else expression returns a bool literal
--> needless_bool.rs:40:5
|
40 | if x && y { return true } else { return false };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to `return x && y`
|
= note: `-D needless-bool` implied by `-D warnings`
error: this if-then-else expression returns a bool literal
--> needless_bool.rs:45:5
|
45 | if x { return false } else { return true };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to `return !x`
|
= note: `-D needless-bool` implied by `-D warnings`
error: this if-then-else expression returns a bool literal
--> needless_bool.rs:50:5
|
50 | if x && y { return false } else { return true };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to `return !(x && y)`
|
= note: `-D needless-bool` 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.

View file

@ -11,26 +11,20 @@ error: this pattern creates a reference to a reference
|
20 | if let Some(ref cake) = Some(&5) {}
| ^^^^^^^^
|
= note: `-D needless-borrow` implied by `-D warnings`
error: this expression borrows a reference that is immediately dereferenced by the compiler
--> needless_borrow.rs:27:15
|
27 | 46 => &&a,
| ^^^
|
= note: `-D needless-borrow` implied by `-D warnings`
error: this pattern creates a reference to a reference
--> needless_borrow.rs:50:31
|
50 | let _ = v.iter().filter(|&ref a| a.is_empty());
| ^^^^^
|
= note: `-D needless-borrow` implied by `-D warnings`
error: aborting due to previous error(s)
error: aborting due to 4 previous errors
To learn more, run the command again with --verbose.

View file

@ -47,7 +47,6 @@ error: There is no need for an explicit `else` block for this `if` expression
46 | | }
| |_________^
|
= note: `-D needless-continue` implied by `-D warnings`
= help: Consider dropping the else clause, and moving out the code in the else block, like so:
if (zero!(i % 2) || nonzero!(i % 5)) && i % 3 != 0 {
continue;
@ -56,7 +55,7 @@ error: There is no need for an explicit `else` block for this `if` expression
println!("Jabber");
...
error: aborting due to previous error(s)
error: aborting due to 2 previous errors
To learn more, run the command again with --verbose.

View file

@ -11,24 +11,18 @@ error: this argument is passed by value, but not consumed in the function body
|
23 | fn bar(x: String, y: Wrapper) {
| ^^^^^^ help: consider changing the type to `&str`
|
= note: `-D needless-pass-by-value` implied by `-D warnings`
error: this argument is passed by value, but not consumed in the function body
--> needless_pass_by_value.rs:23:22
|
23 | fn bar(x: String, y: Wrapper) {
| ^^^^^^^ help: consider taking a reference instead `&Wrapper`
|
= note: `-D needless-pass-by-value` implied by `-D warnings`
error: this argument is passed by value, but not consumed in the function body
--> needless_pass_by_value.rs:29:63
|
29 | fn test_borrow_trait<T: std::borrow::Borrow<str>, U>(t: T, u: U) {
| ^ help: consider taking a reference instead `&U`
|
= note: `-D needless-pass-by-value` implied by `-D warnings`
error: this argument is passed by value, but not consumed in the function body
--> needless_pass_by_value.rs:40:18
@ -36,7 +30,6 @@ error: this argument is passed by value, but not consumed in the function body
40 | fn test_match(x: Option<Option<String>>, y: Option<Option<String>>) {
| ^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D needless-pass-by-value` implied by `-D warnings`
help: consider taking a reference instead
| fn test_match(x: &Option<Option<String>>, y: Option<Option<String>>) {
| match *x {
@ -46,8 +39,6 @@ error: this argument is passed by value, but not consumed in the function body
|
53 | fn test_destructure(x: Wrapper, y: Wrapper, z: Wrapper) {
| ^^^^^^^ help: consider taking a reference instead `&Wrapper`
|
= note: `-D needless-pass-by-value` implied by `-D warnings`
error: this argument is passed by value, but not consumed in the function body
--> needless_pass_by_value.rs:53:36
@ -55,14 +46,13 @@ error: this argument is passed by value, but not consumed in the function body
53 | fn test_destructure(x: Wrapper, y: Wrapper, z: Wrapper) {
| ^^^^^^^
|
= note: `-D needless-pass-by-value` implied by `-D warnings`
help: consider taking a reference instead
| fn test_destructure(x: Wrapper, y: &Wrapper, z: Wrapper) {
| let Wrapper(s) = z; // moved
| let Wrapper(ref t) = *y; // not moved
| let Wrapper(_) = *y; // still not moved
error: aborting due to previous error(s)
error: aborting due to 7 previous errors
To learn more, run the command again with --verbose.

View file

@ -11,58 +11,44 @@ error: unneeded return statement
|
15 | return true
| ^^^^^^^^^^^ help: remove `return` as shown: `true`
|
= note: `-D needless-return` implied by `-D warnings`
error: unneeded return statement
--> needless_return.rs:20:9
|
20 | return true;
| ^^^^^^^^^^^^ help: remove `return` as shown: `true`
|
= note: `-D needless-return` implied by `-D warnings`
error: unneeded return statement
--> needless_return.rs:22:9
|
22 | return false;
| ^^^^^^^^^^^^^ help: remove `return` as shown: `false`
|
= note: `-D needless-return` implied by `-D warnings`
error: unneeded return statement
--> needless_return.rs:28:17
|
28 | true => return false,
| ^^^^^^^^^^^^ help: remove `return` as shown: `false`
|
= note: `-D needless-return` implied by `-D warnings`
error: unneeded return statement
--> needless_return.rs:30:13
|
30 | return true;
| ^^^^^^^^^^^^ help: remove `return` as shown: `true`
|
= note: `-D needless-return` implied by `-D warnings`
error: unneeded return statement
--> needless_return.rs:37:9
|
37 | return true;
| ^^^^^^^^^^^^ help: remove `return` as shown: `true`
|
= note: `-D needless-return` implied by `-D warnings`
error: unneeded return statement
--> needless_return.rs:39:16
|
39 | let _ = || return true;
| ^^^^^^^^^^^ help: remove `return` as shown: `true`
|
= note: `-D needless-return` implied by `-D warnings`
error: aborting due to previous error(s)
error: aborting due to 8 previous errors
To learn more, run the command again with --verbose.

View file

@ -6,7 +6,7 @@ error: struct update has no effect, all the fields in the struct have already be
|
= note: `-D needless-update` implied by `-D warnings`
error: aborting due to previous error(s)
error: aborting due to previous error
To learn more, run the command again with --verbose.

View file

@ -11,10 +11,8 @@ error: Negation by multiplying with -1
|
32 | -1 * x;
| ^^^^^^
|
= note: `-D neg-multiply` implied by `-D warnings`
error: aborting due to previous error(s)
error: aborting due to 2 previous errors
To learn more, run the command again with --verbose.

View file

@ -20,8 +20,6 @@ error: this loop never actually loops
30 | | break
31 | | }
| |_____^
|
= note: `-D never-loop` implied by `-D warnings`
error: this loop never actually loops
--> never_loop.rs:47:2
@ -33,8 +31,6 @@ error: this loop never actually loops
51 | | return
52 | | }
| |__^
|
= note: `-D never-loop` implied by `-D warnings`
error: this loop never actually loops
--> never_loop.rs:48:9
@ -43,8 +39,6 @@ error: this loop never actually loops
49 | | break
50 | | }
| |_________^
|
= note: `-D never-loop` implied by `-D warnings`
error: this loop never actually loops
--> never_loop.rs:57:5
@ -57,8 +51,6 @@ error: this loop never actually loops
63 | | return
64 | | }
| |__^
|
= note: `-D never-loop` implied by `-D warnings`
error: this loop never actually loops
--> never_loop.rs:59:3
@ -68,8 +60,6 @@ error: this loop never actually loops
61 | | continue 'outer
62 | | }
| |___^
|
= note: `-D never-loop` implied by `-D warnings`
error: this loop never actually loops
--> never_loop.rs:92:5
@ -78,8 +68,6 @@ error: this loop never actually loops
93 | | return
94 | | }
| |_____^
|
= note: `-D never-loop` implied by `-D warnings`
error: this loop never actually loops
--> never_loop.rs:98:5
@ -91,10 +79,8 @@ error: this loop never actually loops
102 | | }
103 | | }
| |_____^
|
= note: `-D never-loop` implied by `-D warnings`
error: aborting due to previous error(s)
error: aborting due to 8 previous errors
To learn more, run the command again with --verbose.

View file

@ -14,7 +14,6 @@ error: you should consider deriving a `Default` implementation for `Bar`
16 | pub fn new() -> Self { Bar }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D new-without-default-derive` implied by `-D warnings`
help: try this
| #[derive(Default)]
@ -34,7 +33,7 @@ help: try this
|
...
error: aborting due to previous error(s)
error: aborting due to 3 previous errors
To learn more, run the command again with --verbose.

View file

@ -11,192 +11,144 @@ error: statement with no effect
|
35 | s2;
| ^^^
|
= note: `-D no-effect` implied by `-D warnings`
error: statement with no effect
--> no_effect.rs:36:5
|
36 | Unit;
| ^^^^^
|
= note: `-D no-effect` implied by `-D warnings`
error: statement with no effect
--> no_effect.rs:37:5
|
37 | Tuple(0);
| ^^^^^^^^^
|
= note: `-D no-effect` implied by `-D warnings`
error: statement with no effect
--> no_effect.rs:38:5
|
38 | Struct { field: 0 };
| ^^^^^^^^^^^^^^^^^^^^
|
= note: `-D no-effect` implied by `-D warnings`
error: statement with no effect
--> no_effect.rs:39:5
|
39 | Struct { ..s };
| ^^^^^^^^^^^^^^^
|
= note: `-D no-effect` implied by `-D warnings`
error: statement with no effect
--> no_effect.rs:40:5
|
40 | Union { a: 0 };
| ^^^^^^^^^^^^^^^
|
= note: `-D no-effect` implied by `-D warnings`
error: statement with no effect
--> no_effect.rs:41:5
|
41 | Enum::Tuple(0);
| ^^^^^^^^^^^^^^^
|
= note: `-D no-effect` implied by `-D warnings`
error: statement with no effect
--> no_effect.rs:42:5
|
42 | Enum::Struct { field: 0 };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D no-effect` implied by `-D warnings`
error: statement with no effect
--> no_effect.rs:43:5
|
43 | 5 + 6;
| ^^^^^^
|
= note: `-D no-effect` implied by `-D warnings`
error: statement with no effect
--> no_effect.rs:44:5
|
44 | *&42;
| ^^^^^
|
= note: `-D no-effect` implied by `-D warnings`
error: statement with no effect
--> no_effect.rs:45:5
|
45 | &6;
| ^^^
|
= note: `-D no-effect` implied by `-D warnings`
error: statement with no effect
--> no_effect.rs:46:5
|
46 | (5, 6, 7);
| ^^^^^^^^^^
|
= note: `-D no-effect` implied by `-D warnings`
error: statement with no effect
--> no_effect.rs:47:5
|
47 | box 42;
| ^^^^^^^
|
= note: `-D no-effect` implied by `-D warnings`
error: statement with no effect
--> no_effect.rs:48:5
|
48 | ..;
| ^^^
|
= note: `-D no-effect` implied by `-D warnings`
error: statement with no effect
--> no_effect.rs:49:5
|
49 | 5..;
| ^^^^
|
= note: `-D no-effect` implied by `-D warnings`
error: statement with no effect
--> no_effect.rs:50:5
|
50 | ..5;
| ^^^^
|
= note: `-D no-effect` implied by `-D warnings`
error: statement with no effect
--> no_effect.rs:51:5
|
51 | 5..6;
| ^^^^^
|
= note: `-D no-effect` implied by `-D warnings`
error: statement with no effect
--> no_effect.rs:52:5
|
52 | 5...6;
| ^^^^^^
|
= note: `-D no-effect` implied by `-D warnings`
error: statement with no effect
--> no_effect.rs:53:5
|
53 | [42, 55];
| ^^^^^^^^^
|
= note: `-D no-effect` implied by `-D warnings`
error: statement with no effect
--> no_effect.rs:54:5
|
54 | [42, 55][1];
| ^^^^^^^^^^^^
|
= note: `-D no-effect` implied by `-D warnings`
error: statement with no effect
--> no_effect.rs:55:5
|
55 | (42, 55).1;
| ^^^^^^^^^^^
|
= note: `-D no-effect` implied by `-D warnings`
error: statement with no effect
--> no_effect.rs:56:5
|
56 | [42; 55];
| ^^^^^^^^^
|
= note: `-D no-effect` implied by `-D warnings`
error: statement with no effect
--> no_effect.rs:57:5
|
57 | [42; 55][13];
| ^^^^^^^^^^^^^
|
= note: `-D no-effect` implied by `-D warnings`
error: statement with no effect
--> no_effect.rs:59:5
|
59 | || x += 5;
| ^^^^^^^^^^
|
= note: `-D no-effect` implied by `-D warnings`
error: statement can be reduced
--> no_effect.rs:65:5
@ -211,146 +163,110 @@ error: statement can be reduced
|
66 | Struct { field: get_number() };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with `get_number();`
|
= note: `-D unnecessary-operation` implied by `-D warnings`
error: statement can be reduced
--> no_effect.rs:67:5
|
67 | Struct { ..get_struct() };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with `get_struct();`
|
= note: `-D unnecessary-operation` implied by `-D warnings`
error: statement can be reduced
--> no_effect.rs:68:5
|
68 | Enum::Tuple(get_number());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with `get_number();`
|
= note: `-D unnecessary-operation` implied by `-D warnings`
error: statement can be reduced
--> no_effect.rs:69:5
|
69 | Enum::Struct { field: get_number() };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with `get_number();`
|
= note: `-D unnecessary-operation` implied by `-D warnings`
error: statement can be reduced
--> no_effect.rs:70:5
|
70 | 5 + get_number();
| ^^^^^^^^^^^^^^^^^ help: replace it with `5;get_number();`
|
= note: `-D unnecessary-operation` implied by `-D warnings`
error: statement can be reduced
--> no_effect.rs:71:5
|
71 | *&get_number();
| ^^^^^^^^^^^^^^^ help: replace it with `get_number();`
|
= note: `-D unnecessary-operation` implied by `-D warnings`
error: statement can be reduced
--> no_effect.rs:72:5
|
72 | &get_number();
| ^^^^^^^^^^^^^^ help: replace it with `get_number();`
|
= note: `-D unnecessary-operation` implied by `-D warnings`
error: statement can be reduced
--> no_effect.rs:73:5
|
73 | (5, 6, get_number());
| ^^^^^^^^^^^^^^^^^^^^^ help: replace it with `5;6;get_number();`
|
= note: `-D unnecessary-operation` implied by `-D warnings`
error: statement can be reduced
--> no_effect.rs:74:5
|
74 | box get_number();
| ^^^^^^^^^^^^^^^^^ help: replace it with `get_number();`
|
= note: `-D unnecessary-operation` implied by `-D warnings`
error: statement can be reduced
--> no_effect.rs:75:5
|
75 | get_number()..;
| ^^^^^^^^^^^^^^^ help: replace it with `get_number();`
|
= note: `-D unnecessary-operation` implied by `-D warnings`
error: statement can be reduced
--> no_effect.rs:76:5
|
76 | ..get_number();
| ^^^^^^^^^^^^^^^ help: replace it with `get_number();`
|
= note: `-D unnecessary-operation` implied by `-D warnings`
error: statement can be reduced
--> no_effect.rs:77:5
|
77 | 5..get_number();
| ^^^^^^^^^^^^^^^^ help: replace it with `5;get_number();`
|
= note: `-D unnecessary-operation` implied by `-D warnings`
error: statement can be reduced
--> no_effect.rs:78:5
|
78 | [42, get_number()];
| ^^^^^^^^^^^^^^^^^^^ help: replace it with `42;get_number();`
|
= note: `-D unnecessary-operation` implied by `-D warnings`
error: statement can be reduced
--> no_effect.rs:79:5
|
79 | [42, 55][get_number() as usize];
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with `[42, 55];get_number() as usize;`
|
= note: `-D unnecessary-operation` implied by `-D warnings`
error: statement can be reduced
--> no_effect.rs:80:5
|
80 | (42, get_number()).1;
| ^^^^^^^^^^^^^^^^^^^^^ help: replace it with `42;get_number();`
|
= note: `-D unnecessary-operation` implied by `-D warnings`
error: statement can be reduced
--> no_effect.rs:81:5
|
81 | [get_number(); 55];
| ^^^^^^^^^^^^^^^^^^^ help: replace it with `get_number();`
|
= note: `-D unnecessary-operation` implied by `-D warnings`
error: statement can be reduced
--> no_effect.rs:82:5
|
82 | [42; 55][get_number() as usize];
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with `[42; 55];get_number() as usize;`
|
= note: `-D unnecessary-operation` implied by `-D warnings`
error: statement can be reduced
--> no_effect.rs:83:5
|
83 | {get_number()};
| ^^^^^^^^^^^^^^^ help: replace it with `get_number();`
|
= note: `-D unnecessary-operation` implied by `-D warnings`
error: aborting due to previous error(s)
error: aborting due to 44 previous errors
To learn more, run the command again with --verbose.

View file

@ -22,7 +22,6 @@ error: binding's name is too similar to existing binding
20 | let cpple: i32;
| ^^^^^
|
= note: `-D similar-names` implied by `-D warnings`
note: existing binding defined here
--> non_expressive_names.rs:16:9
|
@ -40,7 +39,6 @@ error: binding's name is too similar to existing binding
45 | let bluby: i32;
| ^^^^^
|
= note: `-D similar-names` implied by `-D warnings`
note: existing binding defined here
--> non_expressive_names.rs:44:9
|
@ -58,7 +56,6 @@ error: binding's name is too similar to existing binding
50 | let coke: i32;
| ^^^^
|
= note: `-D similar-names` implied by `-D warnings`
note: existing binding defined here
--> non_expressive_names.rs:48:9
|
@ -71,7 +68,6 @@ error: binding's name is too similar to existing binding
68 | let xyzeabc: i32;
| ^^^^^^^
|
= note: `-D similar-names` implied by `-D warnings`
note: existing binding defined here
--> non_expressive_names.rs:66:9
|
@ -84,7 +80,6 @@ error: binding's name is too similar to existing binding
72 | let parsee: i32;
| ^^^^^^
|
= note: `-D similar-names` implied by `-D warnings`
note: existing binding defined here
--> non_expressive_names.rs:70:9
|
@ -102,7 +97,6 @@ error: binding's name is too similar to existing binding
86 | bpple: sprang } = unimplemented!();
| ^^^^^^
|
= note: `-D similar-names` implied by `-D warnings`
note: existing binding defined here
--> non_expressive_names.rs:85:22
|
@ -122,26 +116,20 @@ error: 5th binding whose name is just one char
|
123 | let e: i32;
| ^
|
= note: `-D many-single-char-names` implied by `-D warnings`
error: 6th binding whose name is just one char
--> non_expressive_names.rs:124:17
|
124 | let f: i32;
| ^
|
= note: `-D many-single-char-names` implied by `-D warnings`
error: 5th binding whose name is just one char
--> non_expressive_names.rs:129:13
|
129 | e => panic!(),
| ^
|
= note: `-D many-single-char-names` 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.

View file

@ -11,7 +11,7 @@ error: Matching on `Some` with `ok()` is redundant
= note: `-D if-let-some-result` implied by `-D warnings`
= help: Consider matching on `Ok(y)` and removing the call to `ok` instead
error: aborting due to previous error(s)
error: aborting due to previous error
To learn more, run the command again with --verbose.

View file

@ -8,7 +8,7 @@ error: needlessly taken reference of both operands
help: use the values directly
| let foo = 5 - 6;
error: aborting due to previous error(s)
error: aborting due to previous error
To learn more, run the command again with --verbose.

View file

@ -11,50 +11,38 @@ error: file opened with "append" and "truncate"
|
9 | OpenOptions::new().append(true).truncate(true).open("foo.txt");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D nonsensical-open-options` implied by `-D warnings`
error: the method "read" is called more than once
--> open_options.rs:11:5
|
11 | OpenOptions::new().read(true).read(false).open("foo.txt");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D nonsensical-open-options` implied by `-D warnings`
error: the method "create" is called more than once
--> open_options.rs:12:5
|
12 | OpenOptions::new().create(true).create(false).open("foo.txt");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D nonsensical-open-options` implied by `-D warnings`
error: the method "write" is called more than once
--> open_options.rs:13:5
|
13 | OpenOptions::new().write(true).write(false).open("foo.txt");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D nonsensical-open-options` implied by `-D warnings`
error: the method "append" is called more than once
--> open_options.rs:14:5
|
14 | OpenOptions::new().append(true).append(false).open("foo.txt");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D nonsensical-open-options` implied by `-D warnings`
error: the method "truncate" is called more than once
--> open_options.rs:15:5
|
15 | OpenOptions::new().truncate(true).truncate(false).open("foo.txt");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D nonsensical-open-options` implied by `-D warnings`
error: aborting due to previous error(s)
error: aborting due to 7 previous errors
To learn more, run the command again with --verbose.

View file

@ -11,58 +11,44 @@ error: You are trying to use classic C overflow conditions that will fail in Rus
|
14 | if a > a + b {
| ^^^^^^^^^
|
= note: `-D overflow-check-conditional` implied by `-D warnings`
error: You are trying to use classic C overflow conditions that will fail in Rust.
--> overflow_check_conditional.rs:17:5
|
17 | if a + b < b {
| ^^^^^^^^^
|
= note: `-D overflow-check-conditional` implied by `-D warnings`
error: You are trying to use classic C overflow conditions that will fail in Rust.
--> overflow_check_conditional.rs:20:5
|
20 | if b > a + b {
| ^^^^^^^^^
|
= note: `-D overflow-check-conditional` implied by `-D warnings`
error: You are trying to use classic C underflow conditions that will fail in Rust.
--> overflow_check_conditional.rs:23:5
|
23 | if a - b > b {
| ^^^^^^^^^
|
= note: `-D overflow-check-conditional` implied by `-D warnings`
error: You are trying to use classic C underflow conditions that will fail in Rust.
--> overflow_check_conditional.rs:26:5
|
26 | if b < a - b {
| ^^^^^^^^^
|
= note: `-D overflow-check-conditional` implied by `-D warnings`
error: You are trying to use classic C underflow conditions that will fail in Rust.
--> overflow_check_conditional.rs:29:5
|
29 | if a - b > a {
| ^^^^^^^^^
|
= note: `-D overflow-check-conditional` implied by `-D warnings`
error: You are trying to use classic C underflow conditions that will fail in Rust.
--> overflow_check_conditional.rs:32:5
|
32 | if a < a - b {
| ^^^^^^^^^
|
= note: `-D overflow-check-conditional` implied by `-D warnings`
error: aborting due to previous error(s)
error: aborting due to 8 previous errors
To learn more, run the command again with --verbose.

View file

@ -1,37 +0,0 @@
error: you probably are missing some parameter in your format string
--> panic.rs:8:16
|
8 | panic!("{}");
| ^^^^
|
= note: `-D panic-params` implied by `-D warnings`
error: you probably are missing some parameter in your format string
--> panic.rs:10:16
|
10 | panic!("{:?}");
| ^^^^^^
|
= note: `-D panic-params` implied by `-D warnings`
error: you probably are missing some parameter in your format string
--> panic.rs:12:23
|
12 | assert!(true, "here be missing values: {}");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D panic-params` implied by `-D warnings`
error: you probably are missing some parameter in your format string
--> panic.rs:22:5
|
22 | assert!("foo bar".contains(&format!("foo {}", "bar")));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D panic-params` implied by `-D warnings`
= note: this error originates in a macro outside of the current crate
error: aborting due to previous error(s)
To learn more, run the command again with --verbose.

View file

@ -6,7 +6,7 @@ error: re-implementing `PartialEq::ne` is unnecessary
|
= note: `-D partialeq-ne-impl` implied by `-D warnings`
error: aborting due to previous error(s)
error: aborting due to previous error
To learn more, run the command again with --verbose.

View file

@ -6,7 +6,7 @@ error: the `y @ _` pattern can be written as just `y`
|
= note: `-D redundant-pattern` implied by `-D warnings`
error: aborting due to previous error(s)
error: aborting due to previous error
To learn more, run the command again with --verbose.

View file

@ -11,66 +11,50 @@ error: operator precedence can trip the unwary
|
9 | 1 + 2 << 3;
| ^^^^^^^^^^ help: consider parenthesizing your expression `(1 + 2) << 3`
|
= note: `-D precedence` implied by `-D warnings`
error: operator precedence can trip the unwary
--> precedence.rs:10:5
|
10 | 4 >> 1 + 1;
| ^^^^^^^^^^ help: consider parenthesizing your expression `4 >> (1 + 1)`
|
= note: `-D precedence` implied by `-D warnings`
error: operator precedence can trip the unwary
--> precedence.rs:11:5
|
11 | 1 + 3 >> 2;
| ^^^^^^^^^^ help: consider parenthesizing your expression `(1 + 3) >> 2`
|
= note: `-D precedence` implied by `-D warnings`
error: operator precedence can trip the unwary
--> precedence.rs:12:5
|
12 | 1 ^ 1 - 1;
| ^^^^^^^^^ help: consider parenthesizing your expression `1 ^ (1 - 1)`
|
= note: `-D precedence` implied by `-D warnings`
error: operator precedence can trip the unwary
--> precedence.rs:13:5
|
13 | 3 | 2 - 1;
| ^^^^^^^^^ help: consider parenthesizing your expression `3 | (2 - 1)`
|
= note: `-D precedence` implied by `-D warnings`
error: operator precedence can trip the unwary
--> precedence.rs:14:5
|
14 | 3 & 5 - 2;
| ^^^^^^^^^ help: consider parenthesizing your expression `3 & (5 - 2)`
|
= note: `-D precedence` implied by `-D warnings`
error: unary minus has lower precedence than method call
--> precedence.rs:15:5
|
15 | -1i32.abs();
| ^^^^^^^^^^^ help: consider adding parentheses to clarify your intent `-(1i32.abs())`
|
= note: `-D precedence` implied by `-D warnings`
error: unary minus has lower precedence than method call
--> precedence.rs:16:5
|
16 | -1f32.abs();
| ^^^^^^^^^^^ help: consider adding parentheses to clarify your intent `-(1f32.abs())`
|
= note: `-D precedence` implied by `-D warnings`
error: aborting due to previous error(s)
error: aborting due to 9 previous errors
To learn more, run the command again with --verbose.

View file

@ -19,50 +19,38 @@ error: use of `print!`
|
25 | print!("Hello");
| ^^^^^^^^^^^^^^^^
|
= note: `-D print-stdout` implied by `-D warnings`
error: use of `print!`
--> print.rs:27:5
|
27 | print!("Hello {}", "World");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D print-stdout` implied by `-D warnings`
error: use of `print!`
--> print.rs:29:5
|
29 | print!("Hello {:?}", "World");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D print-stdout` implied by `-D warnings`
error: use of `Debug`-based formatting
--> print.rs:29:26
|
29 | print!("Hello {:?}", "World");
| ^^^^^^^
|
= note: `-D use-debug` implied by `-D warnings`
error: use of `print!`
--> print.rs:31:5
|
31 | print!("Hello {:#?}", "#orld");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D print-stdout` implied by `-D warnings`
error: use of `Debug`-based formatting
--> print.rs:31:27
|
31 | print!("Hello {:#?}", "#orld");
| ^^^^^^^
|
= note: `-D use-debug` implied by `-D warnings`
error: aborting due to previous error(s)
error: aborting due to 8 previous errors
To learn more, run the command again with --verbose.

View file

@ -11,26 +11,20 @@ error: using `print!()` with a format string that ends in a newline, consider us
|
7 | print!("Hello {}\n", "world");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D print-with-newline` implied by `-D warnings`
error: using `print!()` with a format string that ends in a newline, consider using `println!()` instead
--> print_with_newline.rs:8:5
|
8 | print!("Hello {} {}\n\n", "world", "#2");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D print-with-newline` implied by `-D warnings`
error: using `print!()` with a format string that ends in a newline, consider using `println!()` instead
--> print_with_newline.rs:9:5
|
9 | print!("{}\n", 1265);
| ^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D print-with-newline` implied by `-D warnings`
error: aborting due to previous error(s)
error: aborting due to 4 previous errors
To learn more, run the command again with --verbose.

View file

@ -11,18 +11,14 @@ error: writing `&String` instead of `&str` involves a new object where a slice w
|
14 | fn do_str(x: &String) {
| ^^^^^^^
|
= note: `-D ptr-arg` implied by `-D warnings`
error: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. Consider changing the type to `&[...]`
--> ptr_arg.rs:27:18
|
27 | fn do_vec(x: &Vec<i64>);
| ^^^^^^^^^
|
= note: `-D ptr-arg` implied by `-D warnings`
error: aborting due to previous error(s)
error: aborting due to 3 previous errors
To learn more, run the command again with --verbose.

View file

@ -11,32 +11,24 @@ error: use of deprecated item: replaced by `Iterator::step_by`
|
16 | (0..1).step_by(1);
| ^^^^^^^
|
= note: `-D deprecated` implied by `-D warnings`
error: use of deprecated item: replaced by `Iterator::step_by`
--> range.rs:18:11
|
18 | (1..).step_by(0);
| ^^^^^^^
|
= note: `-D deprecated` implied by `-D warnings`
error: use of deprecated item: replaced by `Iterator::step_by`
--> range.rs:19:13
|
19 | (1...2).step_by(0);
| ^^^^^^^
|
= note: `-D deprecated` implied by `-D warnings`
error: use of deprecated item: replaced by `Iterator::step_by`
--> range.rs:22:7
|
22 | x.step_by(0);
| ^^^^^^^
|
= note: `-D deprecated` implied by `-D warnings`
error: It is more idiomatic to use v1.iter().enumerate()
--> range.rs:30:14
@ -54,7 +46,7 @@ error: Iterator::step_by(0) will panic at runtime
|
= note: `-D iterator-step-by-zero` implied by `-D warnings`
error: aborting due to previous error(s)
error: aborting due to 7 previous errors
To learn more, run the command again with --verbose.

View file

@ -11,34 +11,26 @@ error: Closure called just once immediately after it was declared
|
18 | i = closure(3);
| ^^^^^^^^^^^^^^
|
= note: `-D redundant-closure-call` implied by `-D warnings`
error: Try not to call a closure in the expression where it is declared.
--> redundant_closure_call.rs:7:10
|
7 | let a = (|| 42)();
| ^^^^^^^^^ help: Try doing something like: `42`
|
= note: `-D redundant-closure-call` implied by `-D warnings`
error: Try not to call a closure in the expression where it is declared.
--> redundant_closure_call.rs:10:14
|
10 | let mut k = (|m| m+1)(i);
| ^^^^^^^^^^^^
|
= note: `-D redundant-closure-call` implied by `-D warnings`
error: Try not to call a closure in the expression where it is declared.
--> redundant_closure_call.rs:12:6
|
12 | k = (|a,b| a*b)(1,5);
| ^^^^^^^^^^^^^^^^
|
= note: `-D redundant-closure-call` implied by `-D warnings`
error: aborting due to previous error(s)
error: aborting due to 5 previous errors
To learn more, run the command again with --verbose.

View file

@ -11,82 +11,62 @@ error: immediately dereferencing a reference
|
21 | let b = *&get_number();
| ^^^^^^^^^^^^^^ help: try this `get_number()`
|
= note: `-D deref-addrof` implied by `-D warnings`
error: immediately dereferencing a reference
--> reference.rs:26:13
|
26 | let b = *&bytes[1..2][0];
| ^^^^^^^^^^^^^^^^ help: try this `bytes[1..2][0]`
|
= note: `-D deref-addrof` implied by `-D warnings`
error: immediately dereferencing a reference
--> reference.rs:30:13
|
30 | let b = *&(a);
| ^^^^^ help: try this `(a)`
|
= note: `-D deref-addrof` implied by `-D warnings`
error: immediately dereferencing a reference
--> reference.rs:32:13
|
32 | let b = *(&a);
| ^^^^^ help: try this `a`
|
= note: `-D deref-addrof` implied by `-D warnings`
error: immediately dereferencing a reference
--> reference.rs:34:13
|
34 | let b = *((&a));
| ^^^^^^^ help: try this `a`
|
= note: `-D deref-addrof` implied by `-D warnings`
error: immediately dereferencing a reference
--> reference.rs:36:13
|
36 | let b = *&&a;
| ^^^^ help: try this `&a`
|
= note: `-D deref-addrof` implied by `-D warnings`
error: immediately dereferencing a reference
--> reference.rs:38:14
|
38 | let b = **&aref;
| ^^^^^^ help: try this `aref`
|
= note: `-D deref-addrof` implied by `-D warnings`
error: immediately dereferencing a reference
--> reference.rs:42:14
|
42 | let b = **&&a;
| ^^^^ help: try this `&a`
|
= note: `-D deref-addrof` implied by `-D warnings`
error: immediately dereferencing a reference
--> reference.rs:46:17
|
46 | let y = *&mut x;
| ^^^^^^^ help: try this `x`
|
= note: `-D deref-addrof` implied by `-D warnings`
error: immediately dereferencing a reference
--> reference.rs:53:18
|
53 | let y = **&mut &mut x;
| ^^^^^^^^^^^^ help: try this `&mut x`
|
= note: `-D deref-addrof` 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.

View file

@ -4,7 +4,7 @@ error[E0463]: can't find crate for `regex`
7 | extern crate regex;
| ^^^^^^^^^^^^^^^^^^^ can't find crate
error: aborting due to previous error(s)
error: aborting due to previous error
To learn more, run the command again with --verbose.

View file

@ -4,7 +4,7 @@ error[E0463]: can't find crate for `serde`
6 | extern crate serde;
| ^^^^^^^^^^^^^^^^^^^ can't find crate
error: aborting due to previous error(s)
error: aborting due to previous error
To learn more, run the command again with --verbose.

View file

@ -17,7 +17,6 @@ error: `x` is shadowed by itself in `{ x }`
14 | let x = { x };
| ^^^^^^^^^
|
= note: `-D shadow-same` implied by `-D warnings`
note: previous binding is here
--> shadow.rs:13:9
|
@ -30,7 +29,6 @@ error: `x` is shadowed by itself in `(&*x)`
15 | let x = (&*x);
| ^^^^^^^^^
|
= note: `-D shadow-same` implied by `-D warnings`
note: previous binding is here
--> shadow.rs:14:9
|
@ -61,7 +59,6 @@ error: `x` is shadowed by `id(x)` which reuses the original value
17 | let x = id(x);
| ^
|
= note: `-D shadow-reuse` implied by `-D warnings`
note: initialization happens here
--> shadow.rs:17:13
|
@ -79,7 +76,6 @@ error: `x` is shadowed by `(1, x)` which reuses the original value
18 | let x = (1, x);
| ^
|
= note: `-D shadow-reuse` implied by `-D warnings`
note: initialization happens here
--> shadow.rs:18:13
|
@ -97,7 +93,6 @@ error: `x` is shadowed by `first(x)` which reuses the original value
19 | let x = first(x);
| ^
|
= note: `-D shadow-reuse` implied by `-D warnings`
note: initialization happens here
--> shadow.rs:19:13
|
@ -133,14 +128,13 @@ error: `x` shadows a previous declaration
23 | let x;
| ^
|
= note: `-D shadow-unrelated` implied by `-D warnings`
note: previous binding is here
--> shadow.rs:21:9
|
21 | let x = y;
| ^
error: aborting due to previous error(s)
error: aborting due to 9 previous errors
To learn more, run the command again with --verbose.

Some files were not shown because too many files have changed in this diff Show more