diff options
| author | Harry Sarson <harry.sarson@hotmail.co.uk> | 2024-06-25 17:24:37 +0100 |
|---|---|---|
| committer | Harry Sarson <harrysarson@codethink.co.uk> | 2024-06-26 08:58:13 +0100 |
| commit | 742c2ea6217067b69ea82b12cdbdd0c1ee6d4c09 (patch) | |
| tree | ecd82e695af6e11f624c026ee9f9bd3e104ab24e /library/std/src/sys/pal/unix/stack_overflow.rs | |
| parent | 9b8b6f92b21e27d26ae334f091cab90f9f9678e5 (diff) | |
| download | rust-742c2ea6217067b69ea82b12cdbdd0c1ee6d4c09.tar.gz rust-742c2ea6217067b69ea82b12cdbdd0c1ee6d4c09.zip | |
do not normalize `use foo::{self}` to `use foo`
It changes behaviour and can cause collisions. E.g. for the following snippet
```rs
mod foo {
pub mod bar {}
pub const bar: i32 = 8;
}
// tranforming the below to `use foo::bar;` causes the error:
//
// the name `bar` is defined multiple times
use foo::bar::{self};
const bar: u32 = 99;
fn main() {
let local_bar = bar;
}
```
we still normalize
```rs
use foo::bar;
use foo::bar::{self};
```
to `use foo::bar;` because this cannot cause collisions.
See: https://github.com/rust-lang/rust-analyzer/pull/17140#issuecomment-2079189725
Diffstat (limited to 'library/std/src/sys/pal/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions
