Traits fail with "cannot infer an appropriate lifetime"
beamspease opened this issue · 2 comments
beamspease commented
Rough situation:
rental! {
mod rent_MyStruct {
use library;
#[rental]
pub struct MyStruct {
my_trait: Box<Trait>,
my_suffix: Suffix<'my_trait>,
}
}
}
Unfortunately, I can't post the exact errors at the moment
jpernst commented
I've isolated the cause and published a fix. 0.4.11 should support trait objects now. Thanks for the report. Note that you might need to add a 'static
bound to the trait object, since rust otherwise tries to guess the bound and it may guess wrong. Reopen this is it's still broken in the new version.
beamspease commented
That's awesome, thanks! :)
…On Tuesday, June 6, 2017, jpernst ***@***.***> wrote:
I've isolated the cause and published a fix. 0.4.11 should support trait
objects now. Thanks for the report.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#18 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AMDN227jjI9vE2OKDILGDr5xZ-M9X81Mks5sBc1sgaJpZM4NxPIF>
.
--
- Steven