]> git.proxmox.com Git - rustc.git/blame - src/test/ui/issues/issue-6318.rs
New upstream version 1.65.0+dfsg1
[rustc.git] / src / test / ui / issues / issue-6318.rs
CommitLineData
b7449926 1// run-pass
c34b1796
AL
2// pretty-expanded FIXME #23616
3
1a4d82fc 4pub enum Thing {
dc9dc135 5 A(Box<dyn Foo+'static>)
1a4d82fc
JJ
6}
7
85aaf69f
SL
8pub trait Foo {
9 fn dummy(&self) { }
10}
1a4d82fc
JJ
11
12pub struct Struct;
13
14impl Foo for Struct {}
223e47cc
LB
15
16pub 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}