Closed
Description
The following program:
#![feature(nll)]
#![feature(never_type)]
#![feature(try_blocks)]
fn main() {
loop {
let _x: Result<_, ()> = try {
Err(())?;
};
}
}
now produces the following error, as of 2019-06-27:
error[E0384]: cannot assign twice to immutable variable `_`
--> src/main.rs:8:13
|
8 | Err(())?;
| ^^^^^^^^ cannot assign twice to immutable variable
error: aborting due to previous error
For more information about this error, try `rustc --explain E0384`.
(note that the playground link currently compiles; I think it's on an older nightly?)
From bisection, this appears to be a regression from #61872 (cc @matthewjasper).
Oddly, removing #![feature(never_type)]
causes the problem to disappear.