mirror of
https://git.proxmox.com/git/rustc
synced 2025-08-16 00:29:23 +00:00
23 lines
343 B
Rust
23 lines
343 B
Rust
//@ 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, .. } => {}
|
|
_ => (),
|
|
};
|
|
}
|