Commit Graph

6 Commits

Author SHA1 Message Date
Felix S. Klock II 003eaf8fe2 placate rustfmt in rustfmt. 2022-03-07 16:37:35 -05:00
Felix S. Klock II ce301d92f1 Placate tidy in submodule. 2022-03-04 17:05:30 -05:00
Felix S. Klock II 651f46376a Adjusted diagnostic output so that if there is no use in a item sequence,
then we just suggest the first legal position where you could inject a use.

To do this, I added `inject_use_span` field to `ModSpans`, and populate it in
parser (it is the span of the first token found after inner attributes, if any).
Then I rewrote the use-suggestion code to utilize it, and threw out some stuff
that is now unnecessary with this in place. (I think the result is easier to
understand.)

Then I added a test of issue 87613.
2022-03-03 18:58:37 -05:00
Felix S. Klock II 4edb757826 refactor: prepare to associate multiple spans with a module. 2022-03-03 14:38:50 -05:00
Eduard-Mihai Burtescu 5723946081 rustc_errors: take self by value in DiagnosticBuilder::cancel. 2022-02-23 06:08:06 +00:00
Caleb Cartwright 6db6bafc61 Merge commit '4a053f206fd6799a25823c307f7d7f9d897be118' into sync-rustfmt-subtree 2021-12-29 20:49:39 -06:00