|
1 | 1 | error: defining use generics `[B, A]` differ from previous defining use
|
2 |
| - --> $DIR/multiple-def-uses-in-one-fn.rs:10:45 |
| 2 | + --> $DIR/multiple-def-uses-in-one-fn.rs:9:45 |
3 | 3 | |
|
4 | 4 | LL | fn f<A, B: 'static>(a: &'static A, b: B) -> (X<A, B>, X<B, A>) {
|
5 | 5 | | ^^^^^^^^^^^^^^^^^^
|
6 | 6 | |
|
7 | 7 | note: previous defining use with different generics `[A, B]` found here
|
8 |
| - --> $DIR/multiple-def-uses-in-one-fn.rs:10:45 |
| 8 | + --> $DIR/multiple-def-uses-in-one-fn.rs:9:45 |
9 | 9 | |
|
10 | 10 | LL | fn f<A, B: 'static>(a: &'static A, b: B) -> (X<A, B>, X<B, A>) {
|
11 | 11 | | ^^^^^^^^^^^^^^^^^^
|
12 | 12 |
|
13 |
| -error[E0277]: the trait bound `&'static B: From<&A>` is not satisfied |
14 |
| - --> $DIR/multiple-def-uses-in-one-fn.rs:7:16 |
15 |
| - | |
16 |
| -LL | type X<A, B> = impl Into<&'static A>; |
17 |
| - | ^^^^^^^^^^^^^^^^^^^^^ the trait `From<&A>` is not implemented for `&'static B` |
18 |
| - | |
19 |
| - = note: required because of the requirements on the impl of `Into<&'static B>` for `&A` |
20 |
| -help: consider introducing a `where` bound, but there might be an alternative better way to express this requirement |
21 |
| - | |
22 |
| -LL | fn f<A, B: 'static>(a: &'static A, b: B) -> (X<A, B>, X<B, A>) where &'static B: From<&A> { |
23 |
| - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ |
24 |
| - |
25 | 13 | error: defining use generics `[B, A]` differ from previous defining use
|
26 |
| - --> $DIR/multiple-def-uses-in-one-fn.rs:10:1 |
| 14 | + --> $DIR/multiple-def-uses-in-one-fn.rs:9:1 |
27 | 15 | |
|
28 | 16 | LL | fn f<A, B: 'static>(a: &'static A, b: B) -> (X<A, B>, X<B, A>) {
|
29 | 17 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
30 | 18 | |
|
31 | 19 | note: previous defining use with different generics `[A, B]` found here
|
32 |
| - --> $DIR/multiple-def-uses-in-one-fn.rs:10:1 |
| 20 | + --> $DIR/multiple-def-uses-in-one-fn.rs:9:1 |
33 | 21 | |
|
34 | 22 | LL | fn f<A, B: 'static>(a: &'static A, b: B) -> (X<A, B>, X<B, A>) {
|
35 | 23 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
36 | 24 |
|
37 |
| -error: aborting due to 3 previous errors |
| 25 | +error: aborting due to 2 previous errors |
38 | 26 |
|
39 |
| -For more information about this error, try `rustc --explain E0277`. |
0 commit comments