diff options
Diffstat (limited to 'src/test/ui/associated-types/associated-types-unsized.stderr')
-rw-r--r-- | src/test/ui/associated-types/associated-types-unsized.stderr | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/test/ui/associated-types/associated-types-unsized.stderr b/src/test/ui/associated-types/associated-types-unsized.stderr new file mode 100644 index 000000000..bec9b1500 --- /dev/null +++ b/src/test/ui/associated-types/associated-types-unsized.stderr @@ -0,0 +1,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`. |