rust-analyzer/crates/ide-db/src
Harry Sarson 23965e4512 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
2024-06-26 08:58:13 +01:00
..
generated Error on using yield without also using #[coroutine] on the closure 2024-04-24 08:05:29 +00:00
imports do not normalize use foo::{self} to use foo 2024-06-26 08:58:13 +01:00
prime_caches internal: Remove load-cargo dependency on ide 2024-02-28 16:59:04 +01:00
syntax_helpers Allow hir::Param to refer to other entity params aside from functions 2024-05-18 12:35:55 +02:00
test_data Make functions in impl have a container name 2023-12-17 13:44:47 -05:00
active_parameter.rs Thread more HasSource::source calls through Semantics for caching 2024-06-10 10:33:07 +02:00
apply_change.rs chore: Prefer tracing span shorthand macros 2024-06-06 16:52:25 -07:00
assists.rs Merge commit 'aa9bc8612514d216f84eec218dfd19ab83f3598a' into sync-from-ra 2023-06-05 12:04:23 +03:00
defs.rs chore: Prefer tracing span shorthand macros 2024-06-06 16:52:25 -07:00
documentation.rs fix: handle escaped chars in doc comments 2024-04-19 14:57:37 +08:00
famous_defs.rs internal: Fix rustdoc warnings 2024-06-13 17:29:10 -07:00
helpers.rs chore: Prefer tracing span shorthand macros 2024-06-06 16:52:25 -07:00
items_locator.rs chore: Prefer tracing span shorthand macros 2024-06-06 16:52:25 -07:00
label.rs fix: Fix impl Trait<Self> causing stackoverflows 2024-04-15 15:41:20 +02:00
lib.rs Split SymbolKind::Function into Function and Method 2024-03-17 11:07:22 +01:00
path_transform.rs internal: refactor prefer_no_std/prefer_prelude bools into a struct 2024-05-22 20:46:30 +02:00
prime_caches.rs Properly prime all crate def maps in parallel_prime_caches 2024-06-17 13:10:39 +02:00
rename.rs Thread more HasSource::source calls through Semantics for caching 2024-06-10 10:33:07 +02:00
rust_doc.rs Remove markdown module from rust-analyzer crate 2023-09-02 17:27:52 +02:00
search.rs chore: Prefer tracing span shorthand macros 2024-06-06 16:52:25 -07:00
source_change.rs Make extract_expressions_from_format_string only use snippets when available 2024-06-02 11:47:05 -04:00
symbol_index.rs chore: Prefer tracing span shorthand macros 2024-06-06 16:52:25 -07:00
traits.rs Deduplicate some code 2024-02-10 01:51:22 +01:00
ty_filter.rs Run cargo fix --edition-idioms 2022-07-20 15:02:08 +02:00
use_trivial_constructor.rs Merge commit '9b3d03408c66749d56466bb09baf2a7177deb6ce' into sync-from-ra 2023-08-21 12:44:09 +03:00