Closed
Description
use std::sync::Arc;
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(Arc<R::DescriptorSet>)
}
fn main() {
let _x = DescriptorSet {slots: Vec::new()};
}
gives the error
<anon>:22:9: 22:11 error: overflow while adding drop-check rules for DescriptorSet<'_> [E0320]
<anon>:22 let _x = DescriptorSet {slots: Vec::new()};
^~
<anon>:22:9: 22:11 note: overflowed on enum AttachInfo variant NextDescriptorSet field #0 type: alloc::arc::Arc<DescriptorSet<'_>>
<anon>:22 let _x = DescriptorSet {slots: Vec::new()};
^~
<anon>:22:14: 22:47 error: overflow while adding drop-check rules for DescriptorSet<'_> [E0320]
<anon>:22 let _x = DescriptorSet {slots: Vec::new()};
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<anon>:22:14: 22:47 note: overflowed on enum AttachInfo variant NextDescriptorSet field #0 type: alloc::arc::Arc<DescriptorSet<'_>>
<anon>:22 let _x = DescriptorSet {slots: Vec::new()};
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<anon>:22:36: 22:46 error: overflow while adding drop-check rules for collections::vec::Vec<AttachInfo<'_, Resources>> [E0320]
<anon>:22 let _x = DescriptorSet {slots: Vec::new()};
^~~~~~~~~~
<anon>:22:36: 22:46 note: overflowed on struct alloc::arc::Arc field `_ptr` type: core::ptr::Shared<alloc::arc::ArcInner<DescriptorSet<'_>>>
<anon>:22 let _x = DescriptorSet {slots: Vec::new()};
^~~~~~~~~~
error: aborting due to 3 previous error
cc @pnkfelix