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