2024-02-16 20:02:50 +00:00
|
|
|
//@ check-pass
|
2021-11-16 09:38:43 +09:00
|
|
|
|
|
|
|
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() {}
|