]> git.lizzy.rs Git - rust.git/commit
Don't expose hir::Path out of hir
authorAleksey Kladov <aleksey.kladov@gmail.com>
Sat, 15 Aug 2020 16:50:41 +0000 (18:50 +0200)
committerAleksey Kladov <aleksey.kladov@gmail.com>
Sat, 15 Aug 2020 16:50:41 +0000 (18:50 +0200)
commit0ca1ba29e8e88c060dcf36946e4e02a6f015754b
tree7b652995dda3849f9deb13c8eac6ad72a39cb283
parent2052d33b9b0e2254f53848501a9113aa12ddf4da
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
crates/assists/src/handlers/auto_import.rs
crates/assists/src/handlers/expand_glob_import.rs
crates/assists/src/handlers/extract_struct_from_enum_variant.rs
crates/assists/src/handlers/replace_qualified_name_with_use.rs
crates/assists/src/utils/insert_use.rs
crates/hir/src/code_model.rs
crates/hir/src/lib.rs
crates/hir/src/semantics.rs
crates/hir/src/source_analyzer.rs