3 ms·
Yes, and IMHO this is one of the biggest design wart of Rust. T: 'unbounded would be much better.
by littlestymaar 2y ago
Yes, and IMHO this is one of the biggest design wart of Rust. T: 'unbounded would be much better.
- phamilton 2y ago`'unbounded` isn't a bad idea. With my team when someone new to Rust hits the static type constraint I usually tell them an overly simplified "is not a reference" followed up with "The data does not have any constraints (or bounds) on its lifetime that this code needs to worry about." I don't know if `unbounded` would immediately be understood by someone new to Rust, but it captures that `T: 'static` is a negating assertion. I.e. it largely says what it can't be.