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