diff --git a/tests/ui/repeated_where_clause_or_trait_bound.fixed b/tests/ui/repeated_where_clause_or_trait_bound.fixed index 0b2b20178fbe..c32fb4e5eac2 100644 --- a/tests/ui/repeated_where_clause_or_trait_bound.fixed +++ b/tests/ui/repeated_where_clause_or_trait_bound.fixed @@ -102,4 +102,12 @@ fn bad_generic + GenericTrait>(arg0: T) { unimplemented!(); } +mod foo { + pub trait Clone {} +} + +fn qualified_path(arg0: T) { + unimplemented!(); +} + fn main() {} diff --git a/tests/ui/repeated_where_clause_or_trait_bound.rs b/tests/ui/repeated_where_clause_or_trait_bound.rs index c9573710c31f..879682a5121f 100644 --- a/tests/ui/repeated_where_clause_or_trait_bound.rs +++ b/tests/ui/repeated_where_clause_or_trait_bound.rs @@ -102,4 +102,12 @@ fn bad_generic + GenericTrait + GenericTrait>(arg unimplemented!(); } +mod foo { + pub trait Clone {} +} + +fn qualified_path(arg0: T) { + unimplemented!(); +} + fn main() {} diff --git a/tests/ui/repeated_where_clause_or_trait_bound.stderr b/tests/ui/repeated_where_clause_or_trait_bound.stderr index 0f2001bfd319..df87ab4f3394 100644 --- a/tests/ui/repeated_where_clause_or_trait_bound.stderr +++ b/tests/ui/repeated_where_clause_or_trait_bound.stderr @@ -46,5 +46,11 @@ error: these bounds contain repeated elements LL | fn bad_generic + GenericTrait + GenericTrait>(arg0: T) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `GenericTrait + GenericTrait` -error: aborting due to 7 previous errors +error: these bounds contain repeated elements + --> $DIR/repeated_where_clause_or_trait_bound.rs:109:22 + | +LL | fn qualified_path(arg0: T) { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Clone + foo::Clone` + +error: aborting due to 8 previous errors