rust/tests/crashes/125874.rs

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

23 lines
343 B
Rust
Raw Normal View History

2024-06-08 16:36:21 +00:00
//@ known-bug: rust-lang/rust#125874
pub trait A {}
pub trait Mirror {
type Assoc: ?Sized;
}
impl<T: ?Sized> Mirror for dyn A {
type Assoc = T;
}
struct Bar {
foo: <dyn A + 'static as Mirror>::Assoc,
}
pub fn main() {
let strct = Bar { foo: 3 };
match strct {
Bar { foo: 1, .. } => {}
_ => (),
};
}