Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removed unnecessary type repetition in float test and regenerated stderr Regenerated type_repetition stderr
- Loading branch information
Showing
3 changed files
with
12 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,39 @@ | ||
error: this type has already been used as a bound predicate | ||
--> $DIR/float_cmp.rs:12:5 | ||
| | ||
LL | T: Copy, | ||
| ^^^^^^^ | ||
| | ||
= note: `-D clippy::type-repetition-in-bounds` implied by `-D warnings` | ||
= help: consider combining the bounds: `T: Add<T, Output = T>, Copy` | ||
|
||
error: strict comparison of f32 or f64 | ||
--> $DIR/float_cmp.rs:60:5 | ||
--> $DIR/float_cmp.rs:59:5 | ||
| | ||
LL | ONE as f64 != 2.0; | ||
| ^^^^^^^^^^^^^^^^^ help: consider comparing them within some error: `(ONE as f64 - 2.0).abs() > error` | ||
| | ||
= note: `-D clippy::float-cmp` implied by `-D warnings` | ||
note: std::f32::EPSILON and std::f64::EPSILON are available. | ||
--> $DIR/float_cmp.rs:60:5 | ||
--> $DIR/float_cmp.rs:59:5 | ||
| | ||
LL | ONE as f64 != 2.0; | ||
| ^^^^^^^^^^^^^^^^^ | ||
|
||
error: strict comparison of f32 or f64 | ||
--> $DIR/float_cmp.rs:65:5 | ||
--> $DIR/float_cmp.rs:64:5 | ||
| | ||
LL | x == 1.0; | ||
| ^^^^^^^^ help: consider comparing them within some error: `(x - 1.0).abs() < error` | ||
| | ||
note: std::f32::EPSILON and std::f64::EPSILON are available. | ||
--> $DIR/float_cmp.rs:65:5 | ||
--> $DIR/float_cmp.rs:64:5 | ||
| | ||
LL | x == 1.0; | ||
| ^^^^^^^^ | ||
|
||
error: strict comparison of f32 or f64 | ||
--> $DIR/float_cmp.rs:68:5 | ||
--> $DIR/float_cmp.rs:67:5 | ||
| | ||
LL | twice(x) != twice(ONE as f64); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider comparing them within some error: `(twice(x) - twice(ONE as f64)).abs() > error` | ||
| | ||
note: std::f32::EPSILON and std::f64::EPSILON are available. | ||
--> $DIR/float_cmp.rs:68:5 | ||
--> $DIR/float_cmp.rs:67:5 | ||
| | ||
LL | twice(x) != twice(ONE as f64); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: aborting due to 4 previous errors | ||
error: aborting due to 3 previous errors | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
error: this type has already been used as a bound predicate | ||
--> $DIR/type_repetition_in_bounds.rs:3:37 | ||
--> $DIR/type_repetition_in_bounds.rs:6:5 | ||
| | ||
LL | pub fn foo<T>(_t: T) where T: Copy, T: Clone { | ||
| ^^^^^^^^ | ||
LL | T: Clone, | ||
| ^^^^^^^^ | ||
| | ||
note: lint level defined here | ||
--> $DIR/type_repetition_in_bounds.rs:1:8 | ||
| | ||
LL | #[deny(clippy::type_repetition_in_bounds)] | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
= help: consider combining the bounds: `T: Copy, Clone` | ||
= help: consider combining the bounds: `T: Copy + Clone` | ||
|
||
error: aborting due to previous error | ||
|