Skip to content

NLL: need a (new) round of review of deltas between .stderr and .nll.stderr output #52663

Closed

Description

We have made a lot of progress on NLL diagnostics

So much so that it behooves us to take a step back and reevaluate where we stand with respect to overall diagnostic quality.

As part of that, we should do another round of review of the differences between AST borrowck diagnostic output and NLL borrowck diagnostic output.


Update: I finished the review, and have put the cases where NLL is not up to par into "buckets." Each bucket has a linked comment on this issue (and, in some cases, a separate issue that is linked from that comment and from the description here).

Here are all the buckets (with links to each specific comment):

  • When a bucket is no longer relevant (either because the issue has been fixed or we've decided its not actually an issue), it will be struckout (like so).
Bucket Rust Issue Pull Request Interested Hackers
On Par, Assuming Faith In RFC 2005
Sort By Span #51167 #52904 @pnkfelix
Better Diagnostic for Trait Object Capture #54848 @davidtwco
Better Diagnostic When "Later" means "A Future Loop Iteration" #52948 @davidtwco
Missing move suggestion #51169 #55069 @matthewjasper
NLL Spans Show Hypothetical Code #52877 #52907 @pnkfelix
NLL diagnostic for += is too desugared
NLL diagnostic is globally bad ... but locally justifiable? #51191 #54720 @davidtwco
The "Later used here" diagnostic is not ideal for return values #53177 @matthewjasper
Provide span for declaration of captured variables #53164 @davidtwco
Test Weakness (might mean NLL is not being tested enough) @pnkfelix
NLL is missing struct field suggestion #54831 @davidtwco
NLL Diagnostic Redundancy
missing lifetime in suggestion #52880 #52883 @estebank
NLL chooses not great span in its "lifetime required" message
NLL fails to suggest + bound on trait object #53900 + #54853 @davidtwco
NLL fails to report lifetime mismatch error
"does not live long enough" when talking about a (thread-local) static #53131 @davidtwco
NLL missing suggestion to extend lifetimes via let bindings #49821 #54088 @matthewjasper
"borrowed content" instead of "dereference of raw pointer" #54825 @davidtwco
NLL lacks various special case handling of closures #53088 + #54976 @matthewjasper + @davidtwco
NLL didn't fix interaction of local dying with temps in dropck #21114, #22323 @pnkfelix
NLL mentions lifetimes that are not included in printed span(s). #52973 @davidtwco
NLL rejects FnMut closure where AST-borrowck accepted it #53040 #54802 @davidtwco
Note and teach elision rules
Need Further Review
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

A-NLLArea: Non-lexical lifetimes (NLL)NLL-diagnosticsWorking towards the "diagnostic parity" goal

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions