Unconstrained lifetime parameters are actually allowed:
https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=e4deca509f64a6d600ae49904e966124
Unlike what's described here:
|
E0207: r##" |
|
Any type parameter or lifetime parameter of an `impl` must meet at least one of |
|
the following criteria: |
|
|
|
- it appears in the _implementing type_ of the impl, e.g. `impl<T> Foo<T>` |
|
- for a trait impl, it appears in the _implemented trait_, e.g. |
|
`impl<T> SomeTrait<T> for Foo` |
|
- it is bound as an associated type, e.g. `impl<T, U> SomeTrait for T |
|
where T: AnotherTrait<AssocType=U>` |
|
|
For comparison, unconstrained type parameters do generate error:
https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=a4d2a865a8a311e0eb46f8ed8583c671
Unconstrained lifetime parameters are actually allowed:
https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=e4deca509f64a6d600ae49904e966124
Unlike what's described here:
rust/src/librustc_typeck/error_codes.rs
Lines 1941 to 1950 in d3e2cec
For comparison, unconstrained type parameters do generate error:
https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=a4d2a865a8a311e0eb46f8ed8583c671