1
Fork 0
rust/tests/ui/traits/new-solver/borrowck-error.rs
2023-12-14 15:22:37 +01:00

11 lines
200 B
Rust

// compile-flags: -Znext-solver
use std::collections::HashMap;
fn foo() -> &'static HashMap<i32, i32>
{
&HashMap::new()
//~^ ERROR cannot return reference to temporary value
}
fn main() {}