|
| 1 | +error[E0277]: the trait bound `(dyn Sized + 'static): ConstDefault` is not satisfied |
| 2 | + --> $DIR/wf_before_evaluate-2.rs:14:14 |
| 3 | + | |
| 4 | +LL | fn user() -> impl Owner<dyn Sized, C = 0> {} |
| 5 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `ConstDefault` is not implemented for `(dyn Sized + 'static)` |
| 6 | + | |
| 7 | +help: this trait has no implementations, consider adding one |
| 8 | + --> $DIR/wf_before_evaluate-2.rs:10:1 |
| 9 | + | |
| 10 | +LL | trait ConstDefault { |
| 11 | + | ^^^^^^^^^^^^^^^^^^ |
| 12 | +note: required for `()` to implement `Owner<(dyn Sized + 'static)>` |
| 13 | + --> $DIR/wf_before_evaluate-2.rs:6:23 |
| 14 | + | |
| 15 | +LL | impl<K: ConstDefault> Owner<K> for () { |
| 16 | + | ------------ ^^^^^^^^ ^^ |
| 17 | + | | |
| 18 | + | unsatisfied trait bound introduced here |
| 19 | + |
| 20 | +error[E0277]: the size for values of type `(dyn Sized + 'static)` cannot be known at compilation time |
| 21 | + --> $DIR/wf_before_evaluate-2.rs:14:14 |
| 22 | + | |
| 23 | +LL | fn user() -> impl Owner<dyn Sized, C = 0> {} |
| 24 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time |
| 25 | + | |
| 26 | + = help: the trait `Sized` is not implemented for `(dyn Sized + 'static)` |
| 27 | + = help: the trait `Owner<K>` is implemented for `()` |
| 28 | +note: required for `()` to implement `Owner<(dyn Sized + 'static)>` |
| 29 | + --> $DIR/wf_before_evaluate-2.rs:6:23 |
| 30 | + | |
| 31 | +LL | impl<K: ConstDefault> Owner<K> for () { |
| 32 | + | - ^^^^^^^^ ^^ |
| 33 | + | | |
| 34 | + | unsatisfied trait bound introduced here |
| 35 | + |
| 36 | +error[E0038]: the trait `Sized` is not dyn compatible |
| 37 | + --> $DIR/wf_before_evaluate-2.rs:14:40 |
| 38 | + | |
| 39 | +LL | fn user() -> impl Owner<dyn Sized, C = 0> {} |
| 40 | + | ^ `Sized` is not dyn compatible |
| 41 | + | |
| 42 | + = note: the trait is not dyn compatible because it requires `Self: Sized` |
| 43 | + = note: for a trait to be dyn compatible it needs to allow building a vtable |
| 44 | + for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility> |
| 45 | + |
| 46 | +error[E0308]: mismatched types |
| 47 | + --> $DIR/wf_before_evaluate-2.rs:14:40 |
| 48 | + | |
| 49 | +LL | fn user() -> impl Owner<dyn Sized, C = 0> {} |
| 50 | + | ^ expected `dyn Sized`, found integer |
| 51 | + | |
| 52 | + = note: expected trait object `(dyn Sized + 'static)` |
| 53 | + found type `{integer}` |
| 54 | + |
| 55 | +error: aborting due to 4 previous errors |
| 56 | + |
| 57 | +Some errors have detailed explanations: E0038, E0277, E0308. |
| 58 | +For more information about an error, try `rustc --explain E0038`. |
0 commit comments