about summary refs log tree commit diff
path: root/compiler/rustc_codegen_gcc
diff options
context:
space:
mode:
authorDylan DPC <99973273+Dylan-DPC@users.noreply.github.com>2022-06-08 07:37:31 +0200
committerGitHub <noreply@github.com>2022-06-08 07:37:31 +0200
commita64a9829c88d7353ff16c4e59835364b70118246 (patch)
treee3fda54c3b3316ddbb62e93afe829e1aaa36f153 /compiler/rustc_codegen_gcc
parentd380b457d86512590bd05d2aabda088d88bb2bf3 (diff)
parentb7ed8601084e58e6919d62c3b32d81c1766ce576 (diff)
downloadrust-a64a9829c88d7353ff16c4e59835364b70118246.tar.gz
rust-a64a9829c88d7353ff16c4e59835364b70118246.zip
Rollup merge of #97819 - compiler-errors:use-import, r=wesleywiser
Recover `import` instead of `use` in item

When we definitely don't have a macro invocation (i.e. when we don't have `import ::`), then it's more productive to parse `import` as if it was incorrectly mistaken for `use`.

Not sure if this needs to be a verbose suggestion, but it renders strangely when it's not verbose:
```
error: expected item, found `import`
 --> /home/michael/test.rs:1:1
  |
1 | import std::{io::{self, Write}, rc::Rc};
  | ^^^^^^ help: items are imported using the `use` keyword: `use`
```

Happy to change it to `span_suggestion` instead of `span_suggestion_verbose` though.

Fixes #97788
Diffstat (limited to 'compiler/rustc_codegen_gcc')
0 files changed, 0 insertions, 0 deletions