|
| 1 | +error: defining use generics `[B, A]` differ from previous defining use |
| 2 | + --> $DIR/multiple-def-uses-in-one-fn3.rs:9:63 |
| 3 | + | |
| 4 | +LL | fn f<A: ToString + Clone, B: ToString + Clone>(a: A, b: B) -> (X<A, B>, X<B, A>) { |
| 5 | + | ^^^^^^^^^^^^^^^^^^ |
| 6 | + | |
| 7 | +note: previous defining use with different generics `[A, B]` found here |
| 8 | + --> $DIR/multiple-def-uses-in-one-fn3.rs:9:63 |
| 9 | + | |
| 10 | +LL | fn f<A: ToString + Clone, B: ToString + Clone>(a: A, b: B) -> (X<A, B>, X<B, A>) { |
| 11 | + | ^^^^^^^^^^^^^^^^^^ |
| 12 | + |
| 13 | +error: defining use generics `[B, A]` differ from previous defining use |
| 14 | + --> $DIR/multiple-def-uses-in-one-fn3.rs:9:1 |
| 15 | + | |
| 16 | +LL | fn f<A: ToString + Clone, B: ToString + Clone>(a: A, b: B) -> (X<A, B>, X<B, A>) { |
| 17 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 18 | + | |
| 19 | +note: previous defining use with different generics `[A, B]` found here |
| 20 | + --> $DIR/multiple-def-uses-in-one-fn3.rs:9:1 |
| 21 | + | |
| 22 | +LL | fn f<A: ToString + Clone, B: ToString + Clone>(a: A, b: B) -> (X<A, B>, X<B, A>) { |
| 23 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 24 | + |
| 25 | +error[E0308]: mismatched types |
| 26 | + --> $DIR/multiple-def-uses-in-one-fn3.rs:16:9 |
| 27 | + | |
| 28 | +LL | fn g<A: ToString + Clone, B: ToString + Clone>(a: A, b: B) -> (X<A, B>, X<A, B>) { |
| 29 | + | - - found type parameter |
| 30 | + | | |
| 31 | + | expected type parameter |
| 32 | +LL | (a, b) |
| 33 | + | ^ expected type parameter `A`, found type parameter `B` |
| 34 | + | |
| 35 | + = note: expected type parameter `A` |
| 36 | + found type parameter `B` |
| 37 | + = note: a type parameter was expected, but a different one was found; you might be missing a type parameter or trait bound |
| 38 | + = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters |
| 39 | + |
| 40 | +error: aborting due to 3 previous errors |
| 41 | + |
| 42 | +For more information about this error, try `rustc --explain E0308`. |
0 commit comments