Skip to content

Add note for to clarify trait restriction for function if we get (in my example "borrow as mutable" error) #68527

@godcodehunter

Description

@godcodehunter

Code example
https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=63c770ffce3c7420dd845653f7250b9f
We can try brute force all implementation, dropping trait restriction:
for generic type
for concrete type
If we find some implementation which allow you to get rid of this error (or maybe from all errors).
We can provide note with candidates and fix for restriction

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsA-suggestion-diagnosticsArea: Suggestions generated by the compiler applied by `cargo fix`C-enhancementCategory: An issue proposing an enhancement or a PR with one.D-papercutDiagnostics: An error or lint that needs small tweaks.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions