rust/tests/ui/regions/regions-ret.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

9 lines
145 B
Rust
Raw Normal View History

2017-08-13 08:46:49 +00:00
fn id<T>(x: T) -> T { x }
fn f(_x: &isize) -> &isize {
return &id(3); //~ ERROR cannot return reference to temporary value
}
fn main() {
}