]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/traits/traits-repeated-supertrait-ambig.stderr
New upstream version 1.44.1+dfsg1
[rustc.git] / src / test / ui / traits / traits-repeated-supertrait-ambig.stderr
index 5b7f32ba1e0f06a3b22f482d665fd4f4818edacb..4107c49bd80ce9b6fee0854abed1b8beafaf4137 100644 (file)
@@ -10,11 +10,10 @@ error[E0277]: the trait bound `C: CompareTo<i32>` is not satisfied
 LL |     c.same_as(22)
    |       ^^^^^^^ the trait `CompareTo<i32>` is not implemented for `C`
    |
-help: consider further restricting this bound with `+ CompareTo<i32>`
-  --> $DIR/traits-repeated-supertrait-ambig.rs:29:17
+help: consider further restricting this bound
    |
-LL | fn with_trait<C:CompareToInts>(c: &C) -> bool {
-   |                 ^^^^^^^^^^^^^
+LL | fn with_trait<C:CompareToInts + CompareTo<i32>>(c: &C) -> bool {
+   |                               ^^^^^^^^^^^^^^^^
 
 error[E0277]: the trait bound `dyn CompareToInts: CompareTo<i32>` is not satisfied
   --> $DIR/traits-repeated-supertrait-ambig.rs:34:5
@@ -34,11 +33,10 @@ LL |     fn same_as(&self, t: T) -> bool;
 LL |     CompareTo::same_as(c, 22)
    |     ^^^^^^^^^^^^^^^^^^ the trait `CompareTo<i32>` is not implemented for `C`
    |
-help: consider further restricting this bound with `+ CompareTo<i32>`
-  --> $DIR/traits-repeated-supertrait-ambig.rs:37:17
+help: consider further restricting this bound
    |
-LL | fn with_ufcs2<C:CompareToInts>(c: &C) -> bool {
-   |                 ^^^^^^^^^^^^^
+LL | fn with_ufcs2<C:CompareToInts + CompareTo<i32>>(c: &C) -> bool {
+   |                               ^^^^^^^^^^^^^^^^
 
 error[E0277]: the trait bound `i64: CompareTo<i32>` is not satisfied
   --> $DIR/traits-repeated-supertrait-ambig.rs:42:23