Move the previous long message to a note and use a shorter primary message:
```
error: missing lifetime in associated type
--> $DIR/missing-lifetime-in-assoc-type-1.rs:9:17
|
LL | impl<'a> IntoIterator for &S {
| ---- there is a named lifetime specified on the impl block you could use
...
LL | type Item = &T;
| ^ this lifetime must come from the implemented type
|
note: in the trait the associated type is declared without lifetime parameters, so using a borrowed type for them requires that lifetime to come from the implemented type
--> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL
help: consider using the lifetime from the impl block
|
LL | type Item = &'a T;
| ++
```
|
||
|---|---|---|
| .. | ||
| assoc-type.rs | ||
| assoc-type.stderr | ||
| bare_type.rs | ||
| constant-used-as-arraylen.rs | ||
| dyn-trait.rs | ||
| dyn-trait.stderr | ||
| explicit-and-elided-same-header.rs | ||
| inherent-impl.rs | ||
| path-elided.rs | ||
| path-elided.stderr | ||
| path-underscore.rs | ||
| ref-underscore.rs | ||
| trait-elided.rs | ||
| trait-elided.stderr | ||
| trait-underscore.rs | ||