diff options
author | Aleksey Kladov <[email protected]> | 2020-08-15 17:50:41 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-08-15 17:50:41 +0100 |
commit | 0ca1ba29e8e88c060dcf36946e4e02a6f015754b (patch) | |
tree | 7b652995dda3849f9deb13c8eac6ad72a39cb283 /crates/assists/src/handlers/auto_import.rs | |
parent | 2052d33b9b0e2254f53848501a9113aa12ddf4da (diff) |
Don't expose hir::Path out of hir
Conjecture: it's impossible to use hir::Path *correctly* from an IDE.
I am not entirely sure about this, and we might need to add it back at
some point, but I have to arguments that convince me that we probably
won't:
* `hir::Path` has to know about hygiene, which an IDE can't set up
properly.
* `hir::Path` lacks identity, but you actually have to know identity
to resolve it correctly
Diffstat (limited to 'crates/assists/src/handlers/auto_import.rs')
-rw-r--r-- | crates/assists/src/handlers/auto_import.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/assists/src/handlers/auto_import.rs b/crates/assists/src/handlers/auto_import.rs index cce789972..b9ec3f10b 100644 --- a/crates/assists/src/handlers/auto_import.rs +++ b/crates/assists/src/handlers/auto_import.rs | |||
@@ -53,7 +53,7 @@ pub(crate) fn auto_import(acc: &mut Assists, ctx: &AssistContext) -> Option<()> | |||
53 | |builder| { | 53 | |builder| { |
54 | insert_use_statement( | 54 | insert_use_statement( |
55 | &auto_import_assets.syntax_under_caret, | 55 | &auto_import_assets.syntax_under_caret, |
56 | &import, | 56 | &import.to_string(), |
57 | ctx, | 57 | ctx, |
58 | builder.text_edit_builder(), | 58 | builder.text_edit_builder(), |
59 | ); | 59 | ); |