about summary refs log tree commit diff
path: root/compiler/rustc_codegen_gcc
diff options
context:
space:
mode:
authorFelix S. Klock II <pnkfelix@pnkfx.org>2022-01-20 14:07:54 -0500
committerFelix S. Klock II <pnkfelix@pnkfx.org>2022-03-03 18:58:37 -0500
commitd37da1e332a77a4cd66c2f36b4a5457f40a7bfd5 (patch)
treef3638bd95437411b3a0c926e0ce9a864997542e9 /compiler/rustc_codegen_gcc
parentb82795244e31ce1ad60bbb823c4e4b91f921c296 (diff)
downloadrust-d37da1e332a77a4cd66c2f36b4a5457f40a7bfd5.tar.gz
rust-d37da1e332a77a4cd66c2f36b4a5457f40a7bfd5.zip
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.
Diffstat (limited to 'compiler/rustc_codegen_gcc')
0 files changed, 0 insertions, 0 deletions