Skip to content

Commit 19ee113

Browse files
authored
Rollup merge of #156244 - el-ev:issue156060, r=mu001999
fix incorrect suggestions in private import diagnostic Resolves rust-lang/rust#156060. 1. In nested imports like `use two::{One, ...}`, the diagnostic suggested replacing the `One` with a multi-segment path of a different module, producing invalid code like `use crate::two::{one::One, Two}`. Skip it when `single_nested == true`. 2. Stop unconditionally skipping the first segment of `import.module_path`, which can produce incorrect paths in edition 2018 and later. 3. Mark the suggestion as "directly" instead of "through the re-export" when the import's source is the definition itself.
2 parents f2fe946 + 714d695 commit 19ee113

0 file changed

File tree

    0 commit comments

    Comments
     (0)