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+
110error[E0053]: method `make` has an incompatible type for trait
2- --> $DIR/defaults-specialization.rs:18 :18
11+ --> $DIR/defaults-specialization.rs:19 :18
312 |
413LL | fn make() -> Self::Ty {
514 | -------- type in trait
@@ -11,7 +20,7 @@ LL | fn make() -> u8 { 0 }
1120 found fn pointer `fn() -> u8`
1221
1322error[E0053]: method `make` has an incompatible type for trait
14- --> $DIR/defaults-specialization.rs:34 :18
23+ --> $DIR/defaults-specialization.rs:35 :18
1524 |
1625LL | fn make() -> Self::Ty {
1726 | -------- type in trait
@@ -26,7 +35,7 @@ LL | fn make() -> bool { true }
2635 found fn pointer `fn() -> bool`
2736
2837error[E0308]: mismatched types
29- --> $DIR/defaults-specialization.rs:9 :9
38+ --> $DIR/defaults-specialization.rs:10 :9
3039 |
3140LL | type Ty = u8;
3241 | ------------- associated type defaults can't be assumed inside the trait defining them
@@ -40,7 +49,7 @@ LL | 0u8
4049 found type `u8`
4150
4251error[E0308]: mismatched types
43- --> $DIR/defaults-specialization.rs:25 :29
52+ --> $DIR/defaults-specialization.rs:26 :29
4453 |
4554LL | fn make() -> Self::Ty { 0u8 }
4655 | -------- ^^^ expected associated type, found `u8`
@@ -53,7 +62,7 @@ LL | fn make() -> Self::Ty { 0u8 }
5362 = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
5463
5564error[E0308]: mismatched types
56- --> $DIR/defaults-specialization.rs:43 :29
65+ --> $DIR/defaults-specialization.rs:44 :29
5766 |
5867LL | default type Ty = bool;
5968 | ----------------------- expected this associated type
@@ -67,7 +76,7 @@ LL | fn make() -> Self::Ty { true }
6776 found type `bool`
6877
6978error[E0308]: mismatched types
70- --> $DIR/defaults-specialization.rs:86 :32
79+ --> $DIR/defaults-specialization.rs:87 :32
7180 |
7281LL | let _: <B<()> as Tr>::Ty = 0u8;
7382 | ----------------- ^^^ expected associated type, found `u8`
@@ -77,13 +86,13 @@ LL | let _: <B<()> as Tr>::Ty = 0u8;
7786 = note: expected associated type `<B<()> as Tr>::Ty`
7887 found type `u8`
7988help: a method is available that returns `<B<()> as Tr>::Ty`
80- --> $DIR/defaults-specialization.rs:8 :5
89+ --> $DIR/defaults-specialization.rs:9 :5
8190 |
8291LL | fn make() -> Self::Ty {
8392 | ^^^^^^^^^^^^^^^^^^^^^ consider calling `Tr::make`
8493
8594error[E0308]: mismatched types
86- --> $DIR/defaults-specialization.rs:87 :32
95+ --> $DIR/defaults-specialization.rs:88 :32
8796 |
8897LL | let _: <B<()> as Tr>::Ty = true;
8998 | ----------------- ^^^^ expected associated type, found `bool`
@@ -93,13 +102,13 @@ LL | let _: <B<()> as Tr>::Ty = true;
93102 = note: expected associated type `<B<()> as Tr>::Ty`
94103 found type `bool`
95104help: a method is available that returns `<B<()> as Tr>::Ty`
96- --> $DIR/defaults-specialization.rs:8 :5
105+ --> $DIR/defaults-specialization.rs:9 :5
97106 |
98107LL | fn make() -> Self::Ty {
99108 | ^^^^^^^^^^^^^^^^^^^^^ consider calling `Tr::make`
100109
101110error[E0308]: mismatched types
102- --> $DIR/defaults-specialization.rs:88 :33
111+ --> $DIR/defaults-specialization.rs:89 :33
103112 |
104113LL | let _: <B2<()> as Tr>::Ty = 0u8;
105114 | ------------------ ^^^ expected associated type, found `u8`
@@ -109,13 +118,13 @@ LL | let _: <B2<()> as Tr>::Ty = 0u8;
109118 = note: expected associated type `<B2<()> as Tr>::Ty`
110119 found type `u8`
111120help: a method is available that returns `<B2<()> as Tr>::Ty`
112- --> $DIR/defaults-specialization.rs:8 :5
121+ --> $DIR/defaults-specialization.rs:9 :5
113122 |
114123LL | fn make() -> Self::Ty {
115124 | ^^^^^^^^^^^^^^^^^^^^^ consider calling `Tr::make`
116125
117126error[E0308]: mismatched types
118- --> $DIR/defaults-specialization.rs:89 :33
127+ --> $DIR/defaults-specialization.rs:90 :33
119128 |
120129LL | let _: <B2<()> as Tr>::Ty = true;
121130 | ------------------ ^^^^ expected associated type, found `bool`
@@ -125,12 +134,12 @@ LL | let _: <B2<()> as Tr>::Ty = true;
125134 = note: expected associated type `<B2<()> as Tr>::Ty`
126135 found type `bool`
127136help: a method is available that returns `<B2<()> as Tr>::Ty`
128- --> $DIR/defaults-specialization.rs:8 :5
137+ --> $DIR/defaults-specialization.rs:9 :5
129138 |
130139LL | fn make() -> Self::Ty {
131140 | ^^^^^^^^^^^^^^^^^^^^^ consider calling `Tr::make`
132141
133- error: aborting due to 9 previous errors
142+ error: aborting due to 9 previous errors; 1 warning emitted
134143
135144Some errors have detailed explanations: E0053, E0308.
136145For more information about an error, try `rustc --explain E0053`.
0 commit comments