Skip to content

NLL diagnostics miss opportunities to suggest "change this to mut" #51031

Closed
@pnkfelix

Description

@pnkfelix

The following tests rightly suggest under AST borrowck to consider adding mut to the binding site, but there is no such suggestion under NLL.

Tests:

  • augmented-assignments.rs
  • codemap_tests/huge_multispan_highlight.rs
  • did_you_mean/issue-31424.rs
  • did_you_mean/issue-39544.rs
  • macros/span-covering-argument-1.rs
  • span/borrowck-borrow-overloaded-auto-deref-mut.rs
  • span/borrowck-borrow-overloaded-deref-mut.rs
  • span/borrowck-object-mutability.rs

(This list of tests is drawn from an informal paper document that I have been using to keep notes for myself as I work on this...)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-NLLArea: Non-lexical lifetimes (NLL)E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.NLL-diagnosticsWorking towards the "diagnostic parity" goal

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions