Skip to content

cannot infer an appropriate lifetime for pattern should have fix suggestions #50195

Closed
@hellow554

Description

@hellow554

While I love NLL, I see, that the error messages one gets are way too complicated.

Example:
Stable vs. Nightly

This question came up on SO and I find this very confusing to new people and if NLL lands in the next iteration of stable, I would suggest using the old recommendation.


(Update from pnkfelix: As discussed in comment thread, NLL is not relevant here. The given examples are not opting into using the feature.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.D-confusingDiagnostics: Confusing error or lint that should be reworked.D-verboseDiagnostics: Too much output caused by a single piece of incorrect code.P-mediumMedium priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions