aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-02-13 11:37:32 +0000
committerGitHub <[email protected]>2020-02-13 11:37:32 +0000
commit1f897d1c6eaa7f0251bb47a5d2d1894cd8e82d54 (patch)
tree87c4f024bfd4308e4ab6a7068102808efec888b6 /crates/ra_hir/src
parent6f2cab1368dafc5663bb591a45062280a94a4ef9 (diff)
parente4f4cd77a07918529cd274f3299a020cbc884974 (diff)
Merge #3120
3120: Support trait auto import r=matklad a=SomeoneToIgnore Unfortunately, for real cases it does not work as spectacular as in the tests. The main reason for that is type inference: * The callee type [here](https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_hir_ty/src/method_resolution.rs#L369) is unknown for many cases * The trait solution [here](https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_hir_ty/src/method_resolution.rs#L399) is also often ambiguous That results in trait candidates being rejected, and some real cases not supported. Example: no imports for `String::from_str("test")` Co-authored-by: Kirill Bulatov <[email protected]>
Diffstat (limited to 'crates/ra_hir/src')
-rw-r--r--crates/ra_hir/src/code_model.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_hir/src/code_model.rs b/crates/ra_hir/src/code_model.rs
index 4fb679f6d..a56b8ab04 100644
--- a/crates/ra_hir/src/code_model.rs
+++ b/crates/ra_hir/src/code_model.rs
@@ -818,7 +818,7 @@ impl TypeParam {
818 } 818 }
819} 819}
820 820
821// FIXME: rename to `ImplBlock` 821// FIXME: rename from `ImplBlock` to `Impl`
822#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] 822#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
823pub struct ImplBlock { 823pub struct ImplBlock {
824 pub(crate) id: ImplId, 824 pub(crate) id: ImplId,