<a href="https://github.com/thestinger"><img src="https://avatars.githubusercontent.com/u/1505226?v=3" align="left" width="96" height="96" hspace="10"></img></a> **Issue by [thestinger](https://github.com/thestinger)** _Wednesday Mar 12, 2014 at 21:15 GMT_ _For earlier discussion, see https://github.com/rust-lang/rust/issues/12853_ _This issue was labelled with: A-lifetimes in the Rust repository_ --- The following works: ``` rust fn foo<'a>(xs: &'a [int]) -> &'a [int] { if xs.len() & 1 == 0 { static ys: &'static [int] = &[1, 2, 3]; ys } else { xs } } ``` This should also work, but does not: ``` rust fn foo<'a>(xs: &'a [int]) -> &'a [int] { if xs.len() & 1 == 0 { &[1, 2, 3] } else { xs } } ```