]> git.lizzy.rs Git - rust.git/blob - src/test/ui/associated-types/associated-types-unsized.stderr
feat(rustdoc): open sidebar menu when links inside it are focused
[rust.git] / src / test / ui / associated-types / associated-types-unsized.stderr
1 error[E0277]: the size for values of type `<T as Get>::Value` cannot be known at compilation time
2   --> $DIR/associated-types-unsized.rs:10:9
3    |
4 LL |     let x = t.get();
5    |         ^ doesn't have a size known at compile-time
6    |
7    = help: the trait `Sized` is not implemented for `<T as Get>::Value`
8    = note: all local variables must have a statically known size
9    = help: unsized locals are gated as an unstable feature
10 help: consider further restricting the associated type
11    |
12 LL | fn foo<T:Get>(t: T) where <T as Get>::Value: Sized {
13    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
14
15 error: aborting due to previous error
16
17 For more information about this error, try `rustc --explain E0277`.