Skip to content

NLL: diagnostics deviate from source line order for no obvious reason #51167

Closed
@pnkfelix

Description

@pnkfelix

Consider:

https://github.com/rust-lang/rust/blob/master/src/test/ui/span/send-is-not-static-ensures-scoping.nll.stderr

compare it to the AST borrowck output:

https://github.com/rust-lang/rust/blob/master/src/test/ui/span/send-is-not-static-ensures-scoping.stderr

  1. Why are we inverting the order in which we report these diagnostics?
  2. We may want to consider not doing that. Even if it means e.g. buffering the diangotics and sorting them before emitting them, or some similar hack. (I admit I am loathe to do this since I myself really like when I am able to correlate the RUST_LOG output with diagnostic output. But if necessary, we could add a -Z flag to turn off the buffer+sorting, in order to bring back such correlation. For end users, buffering+sorting is probably a net win.)

An important reason to prioritize this: Fixing this is likely going to make our internal process for comparing the diagnostic output more efficient.

Metadata

Metadata

Assignees

Labels

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

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions