]>
Commit | Line | Data |
---|---|---|
8faf50e0 | 1 | error[E0277]: the size for values of type `Self` cannot be known at compilation time |
0731742a | 2 | --> $DIR/issue-27078.rs:5:12 |
8faf50e0 XL |
3 | | |
4 | LL | fn foo(self) -> &'static i32 { | |
f9f354fc | 5 | | ^^^^ doesn't have a size known at compile-time |
8faf50e0 | 6 | | |
29967ef6 | 7 | = help: unsized fn params are gated as an unstable feature |
f9f354fc XL |
8 | help: consider further restricting `Self` |
9 | | | |
1b1a35ee XL |
10 | LL | fn foo(self) -> &'static i32 where Self: Sized { |
11 | | ^^^^^^^^^^^^^^^^^ | |
3dfed10e XL |
12 | help: function arguments must have a statically known size, borrowed types always have a known size |
13 | | | |
14 | LL | fn foo(&self) -> &'static i32 { | |
15 | | ^ | |
8faf50e0 XL |
16 | |
17 | error: aborting due to previous error | |
18 | ||
19 | For more information about this error, try `rustc --explain E0277`. |