diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-02-13 11:37:32 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-02-13 11:37:32 +0000 |
commit | 1f897d1c6eaa7f0251bb47a5d2d1894cd8e82d54 (patch) | |
tree | 87c4f024bfd4308e4ab6a7068102808efec888b6 /crates/ra_syntax/test_data/parser/ok/0037_mod.rs | |
parent | 6f2cab1368dafc5663bb591a45062280a94a4ef9 (diff) | |
parent | e4f4cd77a07918529cd274f3299a020cbc884974 (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_syntax/test_data/parser/ok/0037_mod.rs')
0 files changed, 0 insertions, 0 deletions