Mention Both HRTB and Generic Lifetime Param in E0637 documentation#123247
Conversation
That's true but that particular suggestion is not super smart and has many issues (that are currently being worked on though) like #123713, #122714 or #122025. Therefore, it shouldn't be taken as a source of absolute truth. For example, fn and_without_explicit_lifetime<T>()
where
T: Iterator<Item = &u32>,
{
}which is not correct (#122025). |
|
As a middle ground instead of replacing the @rustbot author |
|
Sure, mentioning both sounds good to me. I've also fixed the grammar in the first line: |
|
@rustbot ready |
fmease
left a comment
There was a problem hiding this comment.
Thanks, very nice! Could you squash the commits? Then I will approve.
Also, small grammar fix.
9e5d607 to
26ed429
Compare
E0637 documentationE0637 documentation
|
@bors r+ rollup |
…iaskrgr Rollup of 3 pull requests Successful merges: - rust-lang#123247 (Mention Both HRTB and Generic Lifetime Param in `E0637` documentation) - rust-lang#124511 (Remove many `#[macro_use] extern crate foo` items) - rust-lang#124550 (Remove redundant union check in `KnownPanicsLint` const prop) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#123247 - veera-sivarajan:fix-error-code-E0637-example-code, r=fmease Mention Both HRTB and Generic Lifetime Param in `E0637` documentation The compiler (rustc 1.77.0) error for `and_without_explicit_lifetime()` in the erroneous code example suggests using a HRTB. But, the corrected example uses an explicit lifetime parameter. This PR fixes it so that the documentation and the compiler suggestion for error code `E0637` are consistent with each other.
The compiler (rustc 1.77.0) error for
and_without_explicit_lifetime()in the erroneous code example suggests using a HRTB. But, the corrected example uses an explicit lifetime parameter.This PR fixes it so that the documentation and the compiler suggestion for error code
E0637are consistent with each other.