3 ms·
Somewhat facetiously: fn identity<T>(t: T) -> T { t } Has no trait bounds, and is clearly generic. You typically can't do very much with completely free t
by icen 9y ago
Somewhat facetiously:
fn identity<T>(t: T) -> T { t }
Has no trait bounds, and is clearly generic. You typically can't do very much with completely free type variables, but Rust has syntactic support for them.
- Nullabillity 9y agoAnd even that implicitly relies on the Sized trait.