about summary refs log tree commit diff
path: root/compiler/rustc_codegen_gcc/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-12-05 04:34:57 +0000
committerbors <bors@rust-lang.org>2023-12-05 04:34:57 +0000
commit9358642e3b8560eee89e6f40aa996c8394a3db31 (patch)
treeee818c6197c3372e4c1e0787bd8fa4701d0aa177 /compiler/rustc_codegen_gcc/src
parent317d14a56cb8c748bf0e2f2afff89c2249ab4423 (diff)
parentbeaf31581a1ade80bbd934e87ae3fa9b2b4c88a4 (diff)
downloadrust-9358642e3b8560eee89e6f40aa996c8394a3db31.tar.gz
rust-9358642e3b8560eee89e6f40aa996c8394a3db31.zip
Auto merge of #118066 - estebank:structured-use-suggestion, r=b-naber
Structured `use` suggestion on privacy error

When encoutering a privacy error on an item through a re-export that is accessible in an alternative path, provide a structured suggestion with that path.

```
error[E0603]: module import `mem` is private
  --> $DIR/private-std-reexport-suggest-public.rs:4:14
   |
LL |     use foo::mem;
   |              ^^^ private module import
   |
note: the module import `mem` is defined here...
  --> $DIR/private-std-reexport-suggest-public.rs:8:9
   |
LL |     use std::mem;
   |         ^^^^^^^^
note: ...and refers to the module `mem` which is defined here
  --> $SRC_DIR/std/src/lib.rs:LL:COL
   |
   = note: you could import this
help: import `mem` through the re-export
   |
LL |     use std::mem;
   |         ~~~~~~~~
```

Fix #42909.
Diffstat (limited to 'compiler/rustc_codegen_gcc/src')
0 files changed, 0 insertions, 0 deletions