Closed
Description
use std::collections::HashMap;
fn foo() -> &'static HashMap<i32, i32>
{
&HashMap::new()
}
fn main() {}
Causes:
thread 'rustc' panicked at 'region constraints already solved', compiler/rustc_infer/src/infer/mod.rs:230:14
Since an evaluate_obligation
call in the new solver doesn't actually call out to a query, so if we've already taken region constraints, a InferCtxt::probe
call will ICE.