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