this post was submitted on 23 Mar 2024
11 points (92.3% liked)
Rust
5966 readers
29 users here now
Welcome to the Rust community! This is a place to discuss about the Rust programming language.
Wormhole
Credits
- The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
The warning is in the wrong place, but it's real.
The actual problem is on line 5, where you have a type alias that doesn't use the lifetime parameter. The warning ought to be there, but rustc expands type aliases in place, so it doesn't check there.
The compiler should be able to fix it by not expanding type aliases directly in place. https://github.com/rust-lang/rust/issues/112792
Ahh, that's good to know! Thanks, together with @taladar@sh.itjust.works fix that resolves it :+1: