rust/tests/crashes/125185.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

27 lines
375 B
Rust
Raw Normal View History

2024-05-18 23:56:57 +02:00
//@ known-bug: rust-lang/rust#125185
//@ compile-flags: -Zvalidate-mir
#![feature(type_alias_impl_trait)]
2024-05-18 23:56:57 +02:00
type Foo = impl Send;
struct A;
#[define_opaque(Foo)]
const fn foo() -> Foo {
value()
}
const VALUE: Foo = foo();
2024-05-18 23:56:57 +02:00
#[define_opaque(Foo)]
fn test(foo: Foo, f: impl for<'b> FnMut()) {
2024-05-18 23:56:57 +02:00
match VALUE {
0 | 0 => {}
_ => (),
}
}
fn main() {}