mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
25 lines
408 B
Rust
25 lines
408 B
Rust
//@ check-pass
|
|
pub trait Backend {
|
|
type DescriptorSetLayout;
|
|
}
|
|
|
|
pub struct Back;
|
|
|
|
impl Backend for Back {
|
|
type DescriptorSetLayout = u32;
|
|
}
|
|
|
|
pub struct HalSetLayouts {
|
|
vertex_layout: <Back as Backend>::DescriptorSetLayout,
|
|
}
|
|
|
|
impl HalSetLayouts {
|
|
pub fn iter<DSL>(self) -> DSL
|
|
where
|
|
Back: Backend<DescriptorSetLayout = DSL>,
|
|
{
|
|
self.vertex_layout
|
|
}
|
|
}
|
|
|
|
fn main() {}
|