diff options
Diffstat (limited to 'tests/ui/impl-trait/in-trait/refine-resolution-errors.stderr')
| -rw-r--r-- | tests/ui/impl-trait/in-trait/refine-resolution-errors.stderr | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/tests/ui/impl-trait/in-trait/refine-resolution-errors.stderr b/tests/ui/impl-trait/in-trait/refine-resolution-errors.stderr index 10ebad2a7d5..fd53c9fef44 100644 --- a/tests/ui/impl-trait/in-trait/refine-resolution-errors.stderr +++ b/tests/ui/impl-trait/in-trait/refine-resolution-errors.stderr @@ -4,6 +4,31 @@ error[E0207]: the type parameter `T` is not constrained by the impl trait, self LL | impl<T: ?Sized> Mirror for () { | ^ unconstrained type parameter -error: aborting due to 1 previous error +error[E0277]: the size for values of type `T` cannot be known at compilation time + --> $DIR/refine-resolution-errors.rs:11:18 + | +LL | impl<T: ?Sized> Mirror for () { + | - this type parameter needs to be `Sized` +LL | +LL | type Assoc = T; + | ^ doesn't have a size known at compile-time + | +note: required by a bound in `Mirror::Assoc` + --> $DIR/refine-resolution-errors.rs:7:5 + | +LL | type Assoc; + | ^^^^^^^^^^^ required by this bound in `Mirror::Assoc` +help: consider removing the `?Sized` bound to make the type parameter `Sized` + | +LL - impl<T: ?Sized> Mirror for () { +LL + impl<T> Mirror for () { + | +help: consider relaxing the implicit `Sized` restriction + | +LL | type Assoc: ?Sized; + | ++++++++ + +error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0207`. +Some errors have detailed explanations: E0207, E0277. +For more information about an error, try `rustc --explain E0207`. |
