about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-07-31 15:36:30 +0200
committerGitHub <noreply@github.com>2024-07-31 15:36:30 +0200
commit336a378fcd873130300f43c1a8daa9149c860158 (patch)
tree119f7657850445e93e5839ad483d27e793686859 /compiler/rustc_codegen_llvm/src
parent75dfe1e63dad4f6205fc6db430c49dcec293c3e1 (diff)
parentb61570ac11650579252a9350505a7064e85b48c5 (diff)
downloadrust-336a378fcd873130300f43c1a8daa9149c860158.tar.gz
rust-336a378fcd873130300f43c1a8daa9149c860158.zip
Rollup merge of #128151 - estebank:missing-extern-crate, r=petrochenkov
Structured suggestion for `extern crate foo` when `foo` isn't resolved in import

When encountering a name in an import that could have come from a crate that wasn't imported, use a structured suggestion to suggest `extern crate foo;` pointing at the right place in the crate.

When encountering `_` in an import, do not suggest `extern crate _;`.

```
error[E0432]: unresolved import `spam`
  --> $DIR/import-from-missing-star-3.rs:2:9
   |
LL |     use spam::*;
   |         ^^^^ maybe a missing crate `spam`?
   |
help: consider importing the `spam` crate
   |
LL + extern crate spam;
   |
```
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions