rust/crates/ra_hir/src
Florian Diebold d6195fa21f Fix completion of HashMap::new
The `ty` function in code_model returned the type with placeholders for type
parameters. That's nice for printing, but not good for completion, because
placeholders won't unify with anything else: So the type we got for `HashMap`
was `HashMap<K, V, T>`, which doesn't unify with `HashMap<?, ?, RandomState>`,
so the `new` method wasn't shown.

Now we instead return `HashMap<{unknown}, {unknown}, {unknown}>`, which does
unify with the impl type. Maybe we should just expose this properly as variables
though, i.e. we'd return something like `exists<type, type, type> HashMap<?0,
?1, ?2>` (in Chalk notation). It'll make the API more complicated, but harder to
misuse. (And it would handle cases like `type TypeAlias<T> = HashMap<T, T>` more
correctly.)
2020-03-13 13:04:32 +01:00
..
semantics Rename ast::ImplBlock -> ast::ImplDef 2020-02-29 21:33:15 +01:00
code_model.rs Fix completion of HashMap::new 2020-03-13 13:04:32 +01:00
db.rs Normalize waiting queries names 2020-03-07 00:18:04 +01:00
diagnostics.rs
from_id.rs Rename ast::ImplBlock -> ast::ImplDef 2020-02-29 21:33:15 +01:00
has_source.rs Rename ast::ImplBlock -> ast::ImplDef 2020-02-29 21:33:15 +01:00
lib.rs Move PathResolution 2020-03-05 11:08:31 +01:00
semantics.rs Restore cargo-fmt gating 2020-03-13 12:54:32 +01:00
source_analyzer.rs Source map returns a result 2020-03-06 14:44:44 +01:00