rust/tests/crashes/119786-2.rs
Maja Kądziołka e25803acea
ExprUseVisitor: remove maybe_read_scrutinee
The split between walk_pat and maybe_read_scrutinee has now become
redundant.

Due to this change, one testcase within the testsuite has become similar
enough to a known ICE to also break. I am leaving this as future work,
as it requires feature(type_alias_impl_trait)
2025-12-17 20:47:47 +01:00

15 lines
250 B
Rust

//@ known-bug: #119786
//@ edition:2021
fn enum_upvar() {
type T = impl Copy;
let foo: T = Some((1u32, 2u32));
let x = move || {
match foo {
None => (),
Some(_) => (),
}
};
}
pub fn main() {}