rust/compiler/rustc_parse/src/parser
Felix S. Klock II d37da1e332 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
..
attr.rs rustc_errors: take self by value in DiagnosticBuilder::cancel. 2022-02-23 06:08:06 +00:00
attr_wrapper.rs Change more x64 size checks to not apply to x32. 2021-09-05 16:42:36 +01:00
diagnostics.rs rename ErrorReported -> ErrorGuaranteed 2022-03-02 09:45:25 -06:00
expr.rs rename ErrorReported -> ErrorGuaranteed 2022-03-02 09:45:25 -06:00
generics.rs rustc_errors: take self by value in DiagnosticBuilder::cancel. 2022-02-23 06:08:06 +00:00
item.rs Adjusted diagnostic output so that if there is no use in a item sequence, 2022-03-03 18:58:37 -05:00
mod.rs rename ErrorReported -> ErrorGuaranteed 2022-03-02 09:45:25 -06:00
nonterminal.rs Tweak diagnostics 2022-02-28 18:22:45 +00:00
pat.rs rename ErrorReported -> ErrorGuaranteed 2022-03-02 09:45:25 -06:00
path.rs 4 - Make more use of let_chains 2022-02-28 07:49:56 -03:00
stmt.rs rename ErrorReported -> ErrorGuaranteed 2022-03-02 09:45:25 -06:00
ty.rs rustc_errors: let DiagnosticBuilder::emit return a "guarantee of emission". 2022-02-23 06:38:52 +00:00