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