Files
rust/tests
Matthias Krüger 62396df898 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.
2026-05-08 20:39:25 +02:00
..
2026-05-06 13:57:36 +02:00
2026-05-06 13:57:36 +02:00