Unnecessary lifetime parameter
โ Rust ๐ 2025-07-29 ๐ค surdeus ๐๏ธ 12Iโve got code that looks a bit like this:
struct A<B: SomeTrait> {x: B::Sub};
struct C<'a> {y: &'a Z};
impl<'a> SomeTrait for C {type Sub = X;}
type D<'a> = A<C<'a>>;
Is it possible to get rid of the <'a> in type D<'a> , since itโs not really doing anything there?
5 posts - 4 participants
๐ท๏ธ Rust_feed