Skip to content

Commit

Permalink
Updating *.stderr files
Browse files Browse the repository at this point in the history
  • Loading branch information
flip1995 committed Aug 1, 2018
1 parent ffa64de commit a124642
Show file tree
Hide file tree
Showing 192 changed files with 2,311 additions and 2,246 deletions.
4 changes: 2 additions & 2 deletions tests/ui/absurd-extreme-comparisons.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ error: this comparison involving the minimum or maximum element for this type co
10 | u <= 0;
| ^^^^^^
|
= note: `-D absurd-extreme-comparisons` implied by `-D warnings`
= note: `-D clippy::absurd-extreme-comparisons` implied by `-D warnings`
= help: because 0 is the minimum value for this type, the case where the two sides are not equal never occurs, consider using u == 0 instead

error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
Expand Down Expand Up @@ -141,7 +141,7 @@ error: <-comparison of unit values detected. This will always be false
31 | () < {};
| ^^^^^^^
|
= note: #[deny(unit_cmp)] on by default
= note: #[deny(clippy::unit_cmp)] on by default

error: aborting due to 18 previous errors

2 changes: 1 addition & 1 deletion tests/ui/approx_const.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ error: approximate value of `f{32, 64}::consts::E` found. Consider using it dire
7 | let my_e = 2.7182;
| ^^^^^^
|
= note: `-D approx-constant` implied by `-D warnings`
= note: `-D clippy::approx-constant` implied by `-D warnings`

error: approximate value of `f{32, 64}::consts::E` found. Consider using it directly
--> $DIR/approx_const.rs:8:20
Expand Down
4 changes: 2 additions & 2 deletions tests/ui/arithmetic.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ error: integer arithmetic detected
8 | 1 + i;
| ^^^^^
|
= note: `-D integer-arithmetic` implied by `-D warnings`
= note: `-D clippy::integer-arithmetic` implied by `-D warnings`

error: integer arithmetic detected
--> $DIR/arithmetic.rs:9:5
Expand Down Expand Up @@ -37,7 +37,7 @@ error: floating-point arithmetic detected
23 | f * 2.0;
| ^^^^^^^
|
= note: `-D float-arithmetic` implied by `-D warnings`
= note: `-D clippy::float-arithmetic` implied by `-D warnings`

error: floating-point arithmetic detected
--> $DIR/arithmetic.rs:25:5
Expand Down
4 changes: 2 additions & 2 deletions tests/ui/assign_ops.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ error: assign operation detected
8 | i += 2;
| ^^^^^^ help: replace it with: `i = i + 2`
|
= note: `-D assign-ops` implied by `-D warnings`
= note: `-D clippy::assign-ops` implied by `-D warnings`

error: assign operation detected
--> $DIR/assign_ops.rs:9:5
Expand Down Expand Up @@ -84,7 +84,7 @@ error: manual implementation of an assign operation
27 | a = a + 1;
| ^^^^^^^^^ help: replace it with: `a += 1`
|
= note: `-D assign-op-pattern` implied by `-D warnings`
= note: `-D clippy::assign-op-pattern` implied by `-D warnings`

error: manual implementation of an assign operation
--> $DIR/assign_ops.rs:28:5
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/assign_ops2.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ error: variable appears on both sides of an assignment operation
8 | a += a + 1;
| ^^^^^^^^^^
|
= note: `-D misrefactored-assign-op` implied by `-D warnings`
= note: `-D clippy::misrefactored-assign-op` implied by `-D warnings`
help: Did you mean a = a + 1 or a = a + a + 1? Consider replacing it with
|
8 | a += 1;
Expand Down
4 changes: 2 additions & 2 deletions tests/ui/attrs.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ error: you have declared `#[inline(always)]` on `test_attr_lint`. This is usuall
6 | #[inline(always)]
| ^^^^^^^^^^^^^^^^^
|
= note: `-D inline-always` implied by `-D warnings`
= note: `-D clippy::inline-always` implied by `-D warnings`

error: the since field must contain a semver-compliant version
--> $DIR/attrs.rs:27:14
|
27 | #[deprecated(since = "forever")]
| ^^^^^^^^^^^^^^^^^
|
= note: `-D deprecated-semver` implied by `-D warnings`
= note: `-D clippy::deprecated-semver` implied by `-D warnings`

error: the since field must contain a semver-compliant version
--> $DIR/attrs.rs:30:14
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/author/matches.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ error: returning the result of a let binding from a block. Consider returning th
9 | x
| ^
|
= note: `-D let-and-return` implied by `-D warnings`
= note: `-D clippy::let-and-return` implied by `-D warnings`
note: this expression can be directly returned
--> $DIR/matches.rs:8:21
|
Expand Down
6 changes: 3 additions & 3 deletions tests/ui/bit_masks.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ error: &-masking with zero
12 | x & 0 == 0;
| ^^^^^^^^^^
|
= note: `-D bad-bit-mask` implied by `-D warnings`
= note: `-D clippy::bad-bit-mask` implied by `-D warnings`

error: this operation will always return zero. This is likely not the intended outcome
--> $DIR/bit_masks.rs:12:5
|
12 | x & 0 == 0;
| ^^^^^
|
= note: #[deny(erasing_op)] on by default
= note: #[deny(clippy::erasing_op)] on by default

error: incompatible bit mask: `_ & 2` can never be equal to `1`
--> $DIR/bit_masks.rs:15:5
Expand Down Expand Up @@ -86,7 +86,7 @@ error: ineffective bit mask: `x | 1` compared to `3`, is the same as x compared
52 | x | 1 > 3;
| ^^^^^^^^^
|
= note: `-D ineffective-bit-mask` implied by `-D warnings`
= note: `-D clippy::ineffective-bit-mask` implied by `-D warnings`

error: ineffective bit mask: `x | 1` compared to `4`, is the same as x compared directly
--> $DIR/bit_masks.rs:53:5
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/blacklisted_name.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ error: use of a blacklisted/placeholder name `foo`
7 | fn test(foo: ()) {}
| ^^^
|
= note: `-D blacklisted-name` implied by `-D warnings`
= note: `-D clippy::blacklisted-name` implied by `-D warnings`

error: use of a blacklisted/placeholder name `foo`
--> $DIR/blacklisted_name.rs:10:9
Expand Down
6 changes: 3 additions & 3 deletions tests/ui/block_in_if_condition.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ error: in an 'if' condition, avoid complex blocks or closures with blocks; inste
33 | | } {
| |_____^
|
= note: `-D block-in-if-condition-stmt` implied by `-D warnings`
= note: `-D clippy::block-in-if-condition-stmt` implied by `-D warnings`
= help: try
let res = {
let x = 3;
Expand All @@ -24,7 +24,7 @@ error: omit braces around single expression condition
41 | if { true } {
| ^^^^^^^^
|
= note: `-D block-in-if-condition-expr` implied by `-D warnings`
= note: `-D clippy::block-in-if-condition-expr` implied by `-D warnings`
= help: try
if true {
6
Expand All @@ -48,7 +48,7 @@ error: this boolean expression can be simplified
67 | if true && x == 3 {
| ^^^^^^^^^^^^^^ help: try: `x == 3`
|
= note: `-D nonminimal-bool` implied by `-D warnings`
= note: `-D clippy::nonminimal-bool` implied by `-D warnings`

error: aborting due to 5 previous errors

2 changes: 1 addition & 1 deletion tests/ui/bool_comparison.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ error: equality checks against true are unnecessary
7 | if x == true { "yes" } else { "no" };
| ^^^^^^^^^ help: try simplifying it as shown: `x`
|
= note: `-D bool-comparison` implied by `-D warnings`
= note: `-D clippy::bool-comparison` implied by `-D warnings`

error: equality checks against false can be replaced by a negation
--> $DIR/bool_comparison.rs:8:8
Expand Down
4 changes: 2 additions & 2 deletions tests/ui/booleans.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ error: this boolean expression contains a logic bug
12 | let _ = a && b || a;
| ^^^^^^^^^^^ help: it would look like the following: `a`
|
= note: `-D logic-bug` implied by `-D warnings`
= note: `-D clippy::logic-bug` implied by `-D warnings`
help: this expression can be optimized out by applying boolean operations to the outer expression
--> $DIR/booleans.rs:12:18
|
Expand All @@ -17,7 +17,7 @@ error: this boolean expression can be simplified
14 | let _ = !true;
| ^^^^^ help: try: `false`
|
= note: `-D nonminimal-bool` implied by `-D warnings`
= note: `-D clippy::nonminimal-bool` implied by `-D warnings`

error: this boolean expression can be simplified
--> $DIR/booleans.rs:15:13
Expand Down
4 changes: 2 additions & 2 deletions tests/ui/borrow_box.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ error: you seem to be trying to use `&Box<T>`. Consider using just `&T`
note: lint level defined here
--> $DIR/borrow_box.rs:4:9
|
4 | #![deny(borrowed_box)]
| ^^^^^^^^^^^^
4 | #![deny(clippy::borrowed_box)]
| ^^^^^^^^^^^^^^^^^^^^

error: you seem to be trying to use `&Box<T>`. Consider using just `&T`
--> $DIR/borrow_box.rs:14:14
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/box_vec.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ error: you seem to be trying to use `Box<Vec<T>>`. Consider using just `Vec<T>`
17 | pub fn test(foo: Box<Vec<bool>>) {
| ^^^^^^^^^^^^^^
|
= note: `-D box-vec` implied by `-D warnings`
= note: `-D clippy::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
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/builtin-type-shadow.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ error: This generic shadows the built-in type `u32`
5 | fn foo<u32>(a: u32) -> u32 {
| ^^^
|
= note: `-D builtin-type-shadow` implied by `-D warnings`
= note: `-D clippy::builtin-type-shadow` implied by `-D warnings`

error[E0308]: mismatched types
--> $DIR/builtin-type-shadow.rs:6:5
Expand Down
4 changes: 2 additions & 2 deletions tests/ui/bytecount.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ error: You appear to be counting bytes the naive way
note: lint level defined here
--> $DIR/bytecount.rs:4:8
|
4 | #[deny(naive_bytecount)]
| ^^^^^^^^^^^^^^^
4 | #[deny(clippy::naive_bytecount)]
| ^^^^^^^^^^^^^^^^^^^^^^^

error: You appear to be counting bytes the naive way
--> $DIR/bytecount.rs:10:13
Expand Down
12 changes: 6 additions & 6 deletions tests/ui/cast.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ error: casting i32 to f32 causes a loss of precision (i32 is 32 bits wide, but f
8 | 1i32 as f32;
| ^^^^^^^^^^^
|
= note: `-D cast-precision-loss` implied by `-D warnings`
= note: `-D clippy::cast-precision-loss` implied by `-D warnings`

error: casting i64 to f32 causes a loss of precision (i64 is 64 bits wide, but f32's mantissa is only 23 bits wide)
--> $DIR/cast.rs:9:5
Expand Down Expand Up @@ -42,7 +42,7 @@ error: casting f32 to i32 may truncate the value
15 | 1f32 as i32;
| ^^^^^^^^^^^
|
= note: `-D cast-possible-truncation` implied by `-D warnings`
= note: `-D clippy::cast-possible-truncation` implied by `-D warnings`

error: casting f32 to u32 may truncate the value
--> $DIR/cast.rs:16:5
Expand All @@ -56,7 +56,7 @@ error: casting f32 to u32 may lose the sign of the value
16 | 1f32 as u32;
| ^^^^^^^^^^^
|
= note: `-D cast-sign-loss` implied by `-D warnings`
= note: `-D clippy::cast-sign-loss` implied by `-D warnings`

error: casting f64 to f32 may truncate the value
--> $DIR/cast.rs:17:5
Expand Down Expand Up @@ -106,7 +106,7 @@ error: casting u8 to i8 may wrap around the value
23 | 1u8 as i8;
| ^^^^^^^^^
|
= note: `-D cast-possible-wrap` implied by `-D warnings`
= note: `-D clippy::cast-possible-wrap` implied by `-D warnings`

error: casting u16 to i16 may wrap around the value
--> $DIR/cast.rs:24:5
Expand Down Expand Up @@ -138,7 +138,7 @@ error: casting f32 to f64 may become silently lossy if types change
29 | 1.0f32 as f64;
| ^^^^^^^^^^^^^ help: try: `f64::from(1.0f32)`
|
= note: `-D cast-lossless` implied by `-D warnings`
= note: `-D clippy::cast-lossless` implied by `-D warnings`

error: casting u8 to u16 may become silently lossy if types change
--> $DIR/cast.rs:31:5
Expand All @@ -164,7 +164,7 @@ error: casting to the same type is unnecessary (`i32` -> `i32`)
37 | 1i32 as i32;
| ^^^^^^^^^^^
|
= note: `-D unnecessary-cast` implied by `-D warnings`
= note: `-D clippy::unnecessary-cast` implied by `-D warnings`

error: casting to the same type is unnecessary (`f32` -> `f32`)
--> $DIR/cast.rs:38:5
Expand Down
10 changes: 5 additions & 5 deletions tests/ui/cast_alignment.stderr
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
error: casting from `*const u8` to a more-strictly-aligned pointer (`*const u16`)
--> $DIR/cast_alignment.rs:13:5
--> $DIR/cast_alignment.rs:15:5
|
13 | (&1u8 as *const u8) as *const u16;
15 | (&1u8 as *const u8) as *const u16;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D cast-ptr-alignment` implied by `-D warnings`
= note: `-D clippy::cast-ptr-alignment` implied by `-D warnings`

error: casting from `*mut u8` to a more-strictly-aligned pointer (`*mut u16`)
--> $DIR/cast_alignment.rs:14:5
--> $DIR/cast_alignment.rs:16:5
|
14 | (&mut 1u8 as *mut u8) as *mut u16;
16 | (&mut 1u8 as *mut u8) as *mut u16;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to 2 previous errors
Expand Down
50 changes: 25 additions & 25 deletions tests/ui/cast_lossless_float.stderr
Original file line number Diff line number Diff line change
@@ -1,63 +1,63 @@
error: casting i8 to f32 may become silently lossy if types change
--> $DIR/cast_lossless_float.rs:5:5
--> $DIR/cast_lossless_float.rs:7:5
|
5 | 1i8 as f32;
7 | 1i8 as f32;
| ^^^^^^^^^^ help: try: `f32::from(1i8)`
|
= note: `-D cast-lossless` implied by `-D warnings`
= note: `-D clippy::cast-lossless` implied by `-D warnings`

error: casting i8 to f64 may become silently lossy if types change
--> $DIR/cast_lossless_float.rs:6:5
--> $DIR/cast_lossless_float.rs:8:5
|
6 | 1i8 as f64;
8 | 1i8 as f64;
| ^^^^^^^^^^ help: try: `f64::from(1i8)`

error: casting u8 to f32 may become silently lossy if types change
--> $DIR/cast_lossless_float.rs:7:5
--> $DIR/cast_lossless_float.rs:9:5
|
7 | 1u8 as f32;
9 | 1u8 as f32;
| ^^^^^^^^^^ help: try: `f32::from(1u8)`

error: casting u8 to f64 may become silently lossy if types change
--> $DIR/cast_lossless_float.rs:8:5
|
8 | 1u8 as f64;
| ^^^^^^^^^^ help: try: `f64::from(1u8)`
--> $DIR/cast_lossless_float.rs:10:5
|
10 | 1u8 as f64;
| ^^^^^^^^^^ help: try: `f64::from(1u8)`

error: casting i16 to f32 may become silently lossy if types change
--> $DIR/cast_lossless_float.rs:9:5
|
9 | 1i16 as f32;
| ^^^^^^^^^^^ help: try: `f32::from(1i16)`
--> $DIR/cast_lossless_float.rs:11:5
|
11 | 1i16 as f32;
| ^^^^^^^^^^^ help: try: `f32::from(1i16)`

error: casting i16 to f64 may become silently lossy if types change
--> $DIR/cast_lossless_float.rs:10:5
--> $DIR/cast_lossless_float.rs:12:5
|
10 | 1i16 as f64;
12 | 1i16 as f64;
| ^^^^^^^^^^^ help: try: `f64::from(1i16)`

error: casting u16 to f32 may become silently lossy if types change
--> $DIR/cast_lossless_float.rs:11:5
--> $DIR/cast_lossless_float.rs:13:5
|
11 | 1u16 as f32;
13 | 1u16 as f32;
| ^^^^^^^^^^^ help: try: `f32::from(1u16)`

error: casting u16 to f64 may become silently lossy if types change
--> $DIR/cast_lossless_float.rs:12:5
--> $DIR/cast_lossless_float.rs:14:5
|
12 | 1u16 as f64;
14 | 1u16 as f64;
| ^^^^^^^^^^^ help: try: `f64::from(1u16)`

error: casting i32 to f64 may become silently lossy if types change
--> $DIR/cast_lossless_float.rs:13:5
--> $DIR/cast_lossless_float.rs:15:5
|
13 | 1i32 as f64;
15 | 1i32 as f64;
| ^^^^^^^^^^^ help: try: `f64::from(1i32)`

error: casting u32 to f64 may become silently lossy if types change
--> $DIR/cast_lossless_float.rs:14:5
--> $DIR/cast_lossless_float.rs:16:5
|
14 | 1u32 as f64;
16 | 1u32 as f64;
| ^^^^^^^^^^^ help: try: `f64::from(1u32)`

error: aborting due to 10 previous errors
Expand Down
Loading

0 comments on commit a124642

Please sign in to comment.