]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-27078.stderr
313c294e8a1a56687ce12bc9287c693cefc34c30
[rust.git] / src / test / ui / issues / issue-27078.stderr
1 error[E0277]: the size for values of type `Self` cannot be known at compilation time
2   --> $DIR/issue-27078.rs:5:12
3    |
4 LL |     fn foo(self) -> &'static i32 {
5    |            ^^^^ doesn't have a size known at compile-time
6    |
7    = help: the trait `std::marker::Sized` is not implemented for `Self`
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 `Self`
11    |
12 LL |     fn foo(self) -> &'static i32 where Self: std::marker::Sized {
13    |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
14
15 error: aborting due to previous error
16
17 For more information about this error, try `rustc --explain E0277`.