]> git.lizzy.rs Git - rust.git/blob - src/test/ui/return-disjoint-regions.rs
Add 'src/tools/rust-analyzer/' from commit '977e12a0bdc3e329af179ef3a9d466af9eb613bb'
[rust.git] / src / test / ui / return-disjoint-regions.rs
1 // See https://github.com/rust-lang/rust/pull/67911#issuecomment-576023915
2 fn f<'a, 'b>(x: i32) -> (&'a i32, &'b i32) {
3     let y = &x;
4     (y, y) //~ ERROR cannot return
5 }
6
7 fn main() {}