2017-08-13 11:46:49 +03:00
|
|
|
fn id<T>(x: T) -> T { x }
|
|
|
|
|
2015-01-08 22:02:42 +11:00
|
|
|
const FOO: usize = 3;
|
2014-10-06 21:16:35 -07:00
|
|
|
|
2017-08-13 11:46:49 +03:00
|
|
|
fn foo() -> &'static usize { &id(FOO) }
|
2019-04-22 08:40:08 +01:00
|
|
|
//~^ ERROR: cannot return reference to temporary value
|
2014-10-06 21:16:35 -07:00
|
|
|
|
|
|
|
fn main() {
|
|
|
|
}
|