mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 16:24:46 +00:00
22 lines
363 B
Rust
22 lines
363 B
Rust
//@ 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() {}
|