fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #71868 - Mark-Simulacrum:stable-1.43.1, r=pietroalbini8d69840ab92

1.43.1
4.3 KiB115 linesraw
1error[E0308]: mismatched types
2  --> $DIR/issue-69306.rs:5:28
3   |
4LL | impl<T> S0<T> {
5   |      - this type parameter
6LL |     const C: S0<u8> = Self(0);
7   |                            ^ expected type parameter `T`, found integer
8   |
9   = note: expected type parameter `T`
10                        found type `{integer}`
11   = help: type parameters must be constrained to match other types
12   = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters
13
14error[E0308]: mismatched types
15  --> $DIR/issue-69306.rs:5:23
16   |
17LL | impl<T> S0<T> {
18   |      - this type parameter
19LL |     const C: S0<u8> = Self(0);
20   |                       ^^^^^^^ expected `u8`, found type parameter `T`
21   |
22   = note: expected struct `S0<u8>`
23              found struct `S0<T>`
24   = help: type parameters must be constrained to match other types
25   = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters
26
27error[E0308]: mismatched types
28  --> $DIR/issue-69306.rs:10:14
29   |
30LL | impl<T> S0<T> {
31   |      - this type parameter
32...
33LL |         Self(0);
34   |              ^ expected type parameter `T`, found integer
35   |
36   = note: expected type parameter `T`
37                        found type `{integer}`
38   = help: type parameters must be constrained to match other types
39   = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters
40
41error[E0308]: mismatched types
42  --> $DIR/issue-69306.rs:27:14
43   |
44LL | impl<T> Foo<T> for <S0<T> as Fun>::Out {
45   |      - this type parameter
46LL |     fn foo() {
47LL |         Self(0);
48   |              ^ expected type parameter `T`, found integer
49   |
50   = note: expected type parameter `T`
51                        found type `{integer}`
52   = help: type parameters must be constrained to match other types
53   = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters
54
55error[E0308]: mismatched types
56  --> $DIR/issue-69306.rs:33:32
57   |
58LL | impl<T> S1<T, u8> {
59   |      - this type parameter
60LL |     const C: S1<u8, u8> = Self(0, 1);
61   |                                ^ expected type parameter `T`, found integer
62   |
63   = note: expected type parameter `T`
64                        found type `{integer}`
65   = help: type parameters must be constrained to match other types
66   = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters
67
68error[E0308]: mismatched types
69  --> $DIR/issue-69306.rs:33:27
70   |
71LL | impl<T> S1<T, u8> {
72   |      - this type parameter
73LL |     const C: S1<u8, u8> = Self(0, 1);
74   |                           ^^^^^^^^^^ expected `u8`, found type parameter `T`
75   |
76   = note: expected struct `S1<u8, _>`
77              found struct `S1<T, _>`
78   = help: type parameters must be constrained to match other types
79   = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters
80
81error[E0308]: mismatched types
82  --> $DIR/issue-69306.rs:41:14
83   |
84LL | impl<T> S2<T> {
85   |      - expected type parameter
86LL |     fn map<U>(x: U) -> S2<U> {
87   |            - found type parameter
88LL |         Self(x)
89   |              ^ expected type parameter `T`, found type parameter `U`
90   |
91   = note: expected type parameter `T`
92              found type parameter `U`
93   = note: a type parameter was expected, but a different one was found; you might be missing a type parameter or trait bound
94   = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters
95
96error[E0308]: mismatched types
97  --> $DIR/issue-69306.rs:41:9
98   |
99LL | impl<T> S2<T> {
100   |      - found type parameter
101LL |     fn map<U>(x: U) -> S2<U> {
102   |            -           ----- expected `S2<U>` because of return type
103   |            |
104   |            expected type parameter
105LL |         Self(x)
106   |         ^^^^^^^ expected type parameter `U`, found type parameter `T`
107   |
108   = note: expected struct `S2<U>`
109              found struct `S2<T>`
110   = note: a type parameter was expected, but a different one was found; you might be missing a type parameter or trait bound
111   = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters
112
113error: aborting due to 8 previous errors
114
115For more information about this error, try `rustc --explain E0308`.