In latest rust stable, nightly and beta (tried this in playground) this code causes undefined behavior.
// danger!
fn never() -> String {
never()
}
fn main() {
let v = never();
println!("{:?}", v);
}
In debug mode this simply causes a stack overflow, but with optimization on it returns an uninitialized value.