mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 23:12:02 +00:00
832751fe1d
The code originally correctly erased the regions of the type it passed to the newly created infcx. But after the `fn_sig` query was made to return an `EarlyBinder<T>`, some substs that were around were substituted there without erasing their regions. They were then passed into the newly cerated infcx, which caused the ICE.
12 lines
203 B
Rust
12 lines
203 B
Rust
// run-rustfix
|
|
use std::pin::Pin;
|
|
|
|
fn foo(_: &mut ()) {}
|
|
|
|
fn main() {
|
|
let mut uwu = ();
|
|
let mut r = Pin::new(&mut uwu);
|
|
foo(r.get_mut());
|
|
foo(r.get_mut()); //~ ERROR use of moved value
|
|
}
|