rust/tests/ui/traits/next-solver/borrowck-error.rs

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

12 lines
200 B
Rust
Raw Normal View History

2023-12-14 06:11:28 -06:00
// 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() {}