]> git.lizzy.rs Git - rust.git/blob - tests/ui/issues/issue-6318.rs
Rollup merge of #106752 - sulami:master, r=estebank
[rust.git] / tests / ui / issues / issue-6318.rs
1 // run-pass
2 // pretty-expanded FIXME #23616
3
4 pub enum Thing {
5     A(Box<dyn Foo+'static>)
6 }
7
8 pub trait Foo {
9     fn dummy(&self) { }
10 }
11
12 pub struct Struct;
13
14 impl Foo for Struct {}
15
16 pub fn main() {
17     match Thing::A(Box::new(Struct) as Box<dyn Foo + 'static>) {
18         Thing::A(_a) => 0,
19     };
20 }