]>
Commit | Line | Data |
---|---|---|
b7449926 | 1 | // run-pass |
c34b1796 AL |
2 | // pretty-expanded FIXME #23616 |
3 | ||
1a4d82fc | 4 | pub enum Thing { |
dc9dc135 | 5 | A(Box<dyn Foo+'static>) |
1a4d82fc JJ |
6 | } |
7 | ||
85aaf69f SL |
8 | pub trait Foo { |
9 | fn dummy(&self) { } | |
10 | } | |
1a4d82fc JJ |
11 | |
12 | pub struct Struct; | |
13 | ||
14 | impl Foo for Struct {} | |
223e47cc LB |
15 | |
16 | pub fn main() { | |
f2b60f7d | 17 | match Thing::A(Box::new(Struct) as Box<dyn Foo + 'static>) { |
85aaf69f | 18 | Thing::A(_a) => 0, |
1a4d82fc | 19 | }; |
223e47cc | 20 | } |