mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 22:41:50 +00:00
24 lines
435 B
Rust
24 lines
435 B
Rust
// run-pass
|
|
|
|
pub struct DescriptorSet<'a> {
|
|
pub slots: Vec<AttachInfo<'a, Resources>>
|
|
}
|
|
|
|
pub trait ResourcesTrait<'r>: Sized {
|
|
type DescriptorSet: 'r;
|
|
}
|
|
|
|
pub struct Resources;
|
|
|
|
impl<'a> ResourcesTrait<'a> for Resources {
|
|
type DescriptorSet = DescriptorSet<'a>;
|
|
}
|
|
|
|
pub enum AttachInfo<'a, R: ResourcesTrait<'a>> {
|
|
NextDescriptorSet(Box<R::DescriptorSet>)
|
|
}
|
|
|
|
fn main() {
|
|
let _x = DescriptorSet {slots: Vec::new()};
|
|
}
|