Open
Description
Somewhere between v. 2 and 3.0.1 countme
changed so the following
#[derive(PartialEq)]
pub struct SegmentedBuf<T> {
_c: countme::Count<Self>,
pub(crate) bufs: SmallVec<[T; 4]>,
pos: usize,
offset: usize,
read_pos: usize,
read_offset: usize,
segment_size: usize,
}
fails with
error[E0310]: the parameter type `T` may not live long enough
--> src/segmented_buffer.rs:104:9
|
103 | pub struct SegmentedBuf<T> {
| - help: consider adding an explicit lifetime bound...: `T: 'static`
104 | _c: countme::Count<Self>,
| ^^^^^^^^^^^^^^^^^^^^ ...so that the type `SegmentedBuf<T>` will meet its required lifetime bounds...
|
note: ...that is required by this bound
--> /home/pkehl/.cargo/registry/src/github.com-1ecc6299db9ec823/countme-3.0.1/src/lib.rs:71:21
|
71 | pub struct Count<T: 'static> {
FYI the error comes from https://github.com/logdna/logdna-rust/blob/main/src/segmented_buffer.rs#L103= (after updating the version in Cargo.toml
). I'm not familiar with logdna-rust
yet, but I'll try to narrow this issue down.
(The same error happens with Rust 1.61.0
and 1.63.0-nightly
.)
Metadata
Metadata
Assignees
Labels
No labels