1 error[E0277]: the size for values of type `Self` cannot be known at compilation time
2 --> $DIR/issue-27078.rs:5:12
4 LL | fn foo(self) -> &'static i32 {
5 | ^^^^ doesn't have a size known at compile-time
7 = help: the trait `std::marker::Sized` is not implemented for `Self`
8 = help: unsized locals are gated as an unstable feature
9 help: consider further restricting `Self`
11 LL | fn foo(self) -> &'static i32 where Self: std::marker::Sized {
12 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
13 help: function arguments must have a statically known size, borrowed types always have a known size
15 LL | fn foo(&self) -> &'static i32 {
18 error: aborting due to previous error
20 For more information about this error, try `rustc --explain E0277`.