You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a spurious 'static bound on the following UniquePtrTarget impl, which was inconsequential prior to #608, but now is quite limiting. We should find a way to avoid needing that bound.
use cxx::{CxxVector,UniquePtr};#[cxx::bridge]mod ffi {extern"C++"{include!("example/include/example.h");typeThing<'a>;}impl<'a>CxxVector<Thing<'a>>{}}fnf<'a>(_:UniquePtr<CxxVector<ffi::Thing<'a>>>){}
error[E0477]: the type `Thing<'a>` does not fulfill the required lifetime --> src/main.rs:14:13 |14 | fn f<'a>(_: UniquePtr<CxxVector<ffi::Thing<'a>>>) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: type must satisfy the static lifetime
The text was updated successfully, but these errors were encountered:
Simply removing the static bound with no other code change:
error[E0310]: the parameter type `T` may not live long enough --> src/unique_ptr.rs:240:42 |236 | unsafe impl<T> UniquePtrTarget for CxxVector<T> | - help: consider adding an explicit lifetime bound...: `T: 'static`...240 | const __NAME: &'static dyn Display = &vector::TypeName::<T>::new(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...so that the type `TypeName<T>` will meet its required lifetime bounds
There is a spurious
'static
bound on the following UniquePtrTarget impl, which was inconsequential prior to #608, but now is quite limiting. We should find a way to avoid needing that bound.cxx/src/unique_ptr.rs
Lines 236 to 238 in 3090721
Example:
The text was updated successfully, but these errors were encountered: