summaryrefslogtreecommitdiffstats
path: root/tests/ui/traits/new-solver/borrowck-error.rs
blob: 4787a2c7e1192820152b645b0d912bd41f55cb5d (plain)
1
2
3
4
5
6
7
8
9
10
11
// compile-flags: -Ztrait-solver=next

use std::collections::HashMap;

fn foo() -> &'static HashMap<i32, i32>
{
    &HashMap::new()
    //~^ ERROR cannot return reference to temporary value
}

fn main() {}