Skip to content

Commit

Permalink
Update ui tests
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Feb 10, 2024
1 parent 8210981 commit 9648d17
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 54 deletions.
10 changes: 5 additions & 5 deletions tests/ui/multiple_bound_locations.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,28 @@ error: bound is defined in more than one place
LL | fn ty<F: std::fmt::Debug>(a: F)
| ^
...
LL | F: Sized
LL | F: Sized,
| ^
|
= note: `-D clippy::multiple-bound-locations` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::multiple_bound_locations)]`

error: bound is defined in more than one place
--> $DIR/multiple_bound_locations.rs:9:17
--> $DIR/multiple_bound_locations.rs:10:17
|
LL | fn lifetime<'a, 'b: 'a, 'c>(a: &'b str, b: &'a str, c: &'c str)
| ^^
...
LL | 'b: 'c
LL | 'b: 'c,
| ^^

error: bound is defined in more than one place
--> $DIR/multiple_bound_locations.rs:15:12
--> $DIR/multiple_bound_locations.rs:17:12
|
LL | fn ty_pred<F: Sized>()
| ^
...
LL | for<'a> F: Send + 'a
LL | for<'a> F: Send + 'a,
| ^

error: aborting due to 3 previous errors
Expand Down
1 change: 1 addition & 0 deletions tests/ui/trait_duplication_in_bounds_unfixable.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#![deny(clippy::trait_duplication_in_bounds)]
#![allow(clippy::multiple_bound_locations)]

use std::collections::BTreeMap;
use std::ops::{Add, AddAssign, Div, DivAssign, Mul, MulAssign, Sub, SubAssign};
Expand Down
16 changes: 8 additions & 8 deletions tests/ui/trait_duplication_in_bounds_unfixable.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error: this trait bound is already specified in the where clause
--> $DIR/trait_duplication_in_bounds_unfixable.rs:6:15
--> $DIR/trait_duplication_in_bounds_unfixable.rs:7:15
|
LL | fn bad_foo<T: Clone + Default, Z: Copy>(arg0: T, arg1: Z)
| ^^^^^
Expand All @@ -12,55 +12,55 @@ LL | #![deny(clippy::trait_duplication_in_bounds)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: this trait bound is already specified in the where clause
--> $DIR/trait_duplication_in_bounds_unfixable.rs:6:23
--> $DIR/trait_duplication_in_bounds_unfixable.rs:7:23
|
LL | fn bad_foo<T: Clone + Default, Z: Copy>(arg0: T, arg1: Z)
| ^^^^^^^
|
= help: consider removing this trait bound

error: this trait bound is already specified in trait declaration
--> $DIR/trait_duplication_in_bounds_unfixable.rs:37:15
--> $DIR/trait_duplication_in_bounds_unfixable.rs:38:15
|
LL | Self: Default;
| ^^^^^^^
|
= help: consider removing this trait bound

error: this trait bound is already specified in trait declaration
--> $DIR/trait_duplication_in_bounds_unfixable.rs:52:15
--> $DIR/trait_duplication_in_bounds_unfixable.rs:53:15
|
LL | Self: Default + Clone;
| ^^^^^^^
|
= help: consider removing this trait bound

error: this trait bound is already specified in trait declaration
--> $DIR/trait_duplication_in_bounds_unfixable.rs:59:15
--> $DIR/trait_duplication_in_bounds_unfixable.rs:60:15
|
LL | Self: Default + Clone;
| ^^^^^^^
|
= help: consider removing this trait bound

error: this trait bound is already specified in trait declaration
--> $DIR/trait_duplication_in_bounds_unfixable.rs:59:25
--> $DIR/trait_duplication_in_bounds_unfixable.rs:60:25
|
LL | Self: Default + Clone;
| ^^^^^
|
= help: consider removing this trait bound

error: this trait bound is already specified in trait declaration
--> $DIR/trait_duplication_in_bounds_unfixable.rs:64:15
--> $DIR/trait_duplication_in_bounds_unfixable.rs:65:15
|
LL | Self: Default;
| ^^^^^^^
|
= help: consider removing this trait bound

error: this trait bound is already specified in trait declaration
--> $DIR/trait_duplication_in_bounds_unfixable.rs:100:15
--> $DIR/trait_duplication_in_bounds_unfixable.rs:101:15
|
LL | Self: Iterator<Item = Foo>,
| ^^^^^^^^^^^^^^^^^^^^
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/type_repetition_in_bounds.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#![deny(clippy::type_repetition_in_bounds)]
#![allow(clippy::extra_unused_type_parameters)]
#![allow(clippy::extra_unused_type_parameters, clippy::multiple_bound_locations)]

use serde::Deserialize;
use std::ops::{Add, AddAssign, Div, DivAssign, Mul, MulAssign, Sub, SubAssign};
Expand Down
1 change: 1 addition & 0 deletions tests/ui/unnecessary_cast.fixed
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#![warn(clippy::unnecessary_cast)]
#![allow(
clippy::borrow_as_ptr,
clippy::multiple_bound_locations,
clippy::no_effect,
clippy::nonstandard_macro_braces,
clippy::unnecessary_operation,
Expand Down
1 change: 1 addition & 0 deletions tests/ui/unnecessary_cast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#![warn(clippy::unnecessary_cast)]
#![allow(
clippy::borrow_as_ptr,
clippy::multiple_bound_locations,
clippy::no_effect,
clippy::nonstandard_macro_braces,
clippy::unnecessary_operation,
Expand Down

0 comments on commit 9648d17

Please sign in to comment.