Add a regression test for #80772

This commit is contained in:
Yuki Okushi 2021-11-16 09:38:43 +09:00
parent 891ca5f63c
commit 894c0e4190
No known key found for this signature in database
GPG Key ID: DABA5B072961C18A

View File

@ -0,0 +1,21 @@
// check-pass
trait SomeTrait {}
pub struct Exhibit {
constant: usize,
factory: fn(&usize) -> Box<dyn SomeTrait>,
}
pub const A_CONSTANT: &[Exhibit] = &[
Exhibit {
constant: 1,
factory: |_| unimplemented!(),
},
Exhibit {
constant: "Hello world".len(),
factory: |_| unimplemented!(),
},
];
fn main() {}