1
+ warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes
2
+ --> $DIR/defaults-specialization.rs:3:38
3
+ |
4
+ LL | #![feature(associated_type_defaults, specialization)]
5
+ | ^^^^^^^^^^^^^^
6
+ |
7
+ = note: `#[warn(incomplete_features)]` on by default
8
+ = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
9
+
1
10
error[E0053]: method `make` has an incompatible type for trait
2
- --> $DIR/defaults-specialization.rs:18 :18
11
+ --> $DIR/defaults-specialization.rs:19 :18
3
12
|
4
13
LL | fn make() -> Self::Ty {
5
14
| -------- type in trait
@@ -11,7 +20,7 @@ LL | fn make() -> u8 { 0 }
11
20
found fn pointer `fn() -> u8`
12
21
13
22
error[E0053]: method `make` has an incompatible type for trait
14
- --> $DIR/defaults-specialization.rs:34 :18
23
+ --> $DIR/defaults-specialization.rs:35 :18
15
24
|
16
25
LL | fn make() -> Self::Ty {
17
26
| -------- type in trait
@@ -26,7 +35,7 @@ LL | fn make() -> bool { true }
26
35
found fn pointer `fn() -> bool`
27
36
28
37
error[E0308]: mismatched types
29
- --> $DIR/defaults-specialization.rs:9 :9
38
+ --> $DIR/defaults-specialization.rs:10 :9
30
39
|
31
40
LL | type Ty = u8;
32
41
| ------------- associated type defaults can't be assumed inside the trait defining them
@@ -40,7 +49,7 @@ LL | 0u8
40
49
found type `u8`
41
50
42
51
error[E0308]: mismatched types
43
- --> $DIR/defaults-specialization.rs:25 :29
52
+ --> $DIR/defaults-specialization.rs:26 :29
44
53
|
45
54
LL | fn make() -> Self::Ty { 0u8 }
46
55
| -------- ^^^ expected associated type, found `u8`
@@ -53,7 +62,7 @@ LL | fn make() -> Self::Ty { 0u8 }
53
62
= note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
54
63
55
64
error[E0308]: mismatched types
56
- --> $DIR/defaults-specialization.rs:43 :29
65
+ --> $DIR/defaults-specialization.rs:44 :29
57
66
|
58
67
LL | default type Ty = bool;
59
68
| ----------------------- expected this associated type
@@ -67,7 +76,7 @@ LL | fn make() -> Self::Ty { true }
67
76
found type `bool`
68
77
69
78
error[E0308]: mismatched types
70
- --> $DIR/defaults-specialization.rs:86 :32
79
+ --> $DIR/defaults-specialization.rs:87 :32
71
80
|
72
81
LL | let _: <B<()> as Tr>::Ty = 0u8;
73
82
| ----------------- ^^^ expected associated type, found `u8`
@@ -77,13 +86,13 @@ LL | let _: <B<()> as Tr>::Ty = 0u8;
77
86
= note: expected associated type `<B<()> as Tr>::Ty`
78
87
found type `u8`
79
88
help: a method is available that returns `<B<()> as Tr>::Ty`
80
- --> $DIR/defaults-specialization.rs:8 :5
89
+ --> $DIR/defaults-specialization.rs:9 :5
81
90
|
82
91
LL | fn make() -> Self::Ty {
83
92
| ^^^^^^^^^^^^^^^^^^^^^ consider calling `Tr::make`
84
93
85
94
error[E0308]: mismatched types
86
- --> $DIR/defaults-specialization.rs:87 :32
95
+ --> $DIR/defaults-specialization.rs:88 :32
87
96
|
88
97
LL | let _: <B<()> as Tr>::Ty = true;
89
98
| ----------------- ^^^^ expected associated type, found `bool`
@@ -93,13 +102,13 @@ LL | let _: <B<()> as Tr>::Ty = true;
93
102
= note: expected associated type `<B<()> as Tr>::Ty`
94
103
found type `bool`
95
104
help: a method is available that returns `<B<()> as Tr>::Ty`
96
- --> $DIR/defaults-specialization.rs:8 :5
105
+ --> $DIR/defaults-specialization.rs:9 :5
97
106
|
98
107
LL | fn make() -> Self::Ty {
99
108
| ^^^^^^^^^^^^^^^^^^^^^ consider calling `Tr::make`
100
109
101
110
error[E0308]: mismatched types
102
- --> $DIR/defaults-specialization.rs:88 :33
111
+ --> $DIR/defaults-specialization.rs:89 :33
103
112
|
104
113
LL | let _: <B2<()> as Tr>::Ty = 0u8;
105
114
| ------------------ ^^^ expected associated type, found `u8`
@@ -109,13 +118,13 @@ LL | let _: <B2<()> as Tr>::Ty = 0u8;
109
118
= note: expected associated type `<B2<()> as Tr>::Ty`
110
119
found type `u8`
111
120
help: a method is available that returns `<B2<()> as Tr>::Ty`
112
- --> $DIR/defaults-specialization.rs:8 :5
121
+ --> $DIR/defaults-specialization.rs:9 :5
113
122
|
114
123
LL | fn make() -> Self::Ty {
115
124
| ^^^^^^^^^^^^^^^^^^^^^ consider calling `Tr::make`
116
125
117
126
error[E0308]: mismatched types
118
- --> $DIR/defaults-specialization.rs:89 :33
127
+ --> $DIR/defaults-specialization.rs:90 :33
119
128
|
120
129
LL | let _: <B2<()> as Tr>::Ty = true;
121
130
| ------------------ ^^^^ expected associated type, found `bool`
@@ -125,12 +134,12 @@ LL | let _: <B2<()> as Tr>::Ty = true;
125
134
= note: expected associated type `<B2<()> as Tr>::Ty`
126
135
found type `bool`
127
136
help: a method is available that returns `<B2<()> as Tr>::Ty`
128
- --> $DIR/defaults-specialization.rs:8 :5
137
+ --> $DIR/defaults-specialization.rs:9 :5
129
138
|
130
139
LL | fn make() -> Self::Ty {
131
140
| ^^^^^^^^^^^^^^^^^^^^^ consider calling `Tr::make`
132
141
133
- error: aborting due to 9 previous errors
142
+ error: aborting due to 9 previous errors; 1 warning emitted
134
143
135
144
Some errors have detailed explanations: E0053, E0308.
136
145
For more information about an error, try `rustc --explain E0053`.
0 commit comments