Closed dtolnay closed 5 years ago
cc https://github.com/rust-lang/rust/issues/49441 https://github.com/rust-lang/rust/issues/21903
cc @eddyb @nikomatsakis
Ugh, I think this wasn't correctly implemented yet, so the lint is still wrong. Maybe someone else should take over the original PRs I made?
unit-type-parameters/README.md#documentation
This section should call out that type_alias_bounds is a future compatibility lint in the sense that the compiler may enforce the bounds eventually and the current behavior is considered a compiler bug.
The thing that makes it safe and correct to write here is that the RHS of the type alias uses exactly the same bounds as the LHS. Where that isn't the case, future compiler changes may break it.