rust/crates
bors[bot] 1f897d1c6e
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 <mail4score@gmail.com>
2020-02-13 11:37:32 +00:00
..
ra_arena Switch to variant-granularity field type inference 2019-11-25 00:12:36 +03:00
ra_assists Do not collect all traits 2020-02-12 23:27:19 +02:00
ra_batch Support setting cargo features 2019-12-13 18:16:34 +08:00
ra_cargo_watch Update snapshot tests due to removed SuggestedFix 2020-02-03 12:24:57 +01:00
ra_cfg Disable doctests 2019-11-17 18:35:05 +03:00
ra_cli Fix extra parentheses warnings 2020-01-31 21:07:21 +02:00
ra_db Apply the reviews suggestions 2020-02-05 12:47:28 +02:00
ra_fmt Refactor if-let -> match assist to use ast::make 2020-02-05 14:08:16 +01:00
ra_hir Revert source_analyzer changes 2020-02-12 17:34:37 +02:00
ra_hir_def Merge #3062 2020-02-11 21:46:36 +00:00
ra_hir_expand Add couple of utility methods 2020-02-12 18:19:55 +01:00
ra_hir_ty Don't let unknown match arms fall back to ! 2020-02-11 21:09:11 +01:00
ra_ide Simplify 2020-02-12 18:02:00 +01:00
ra_ide_db Rename 2020-02-07 14:26:59 +01:00
ra_lsp_server prevent "Play" symbol in "Run Test" code lens from rendering as emoji 2020-02-13 15:09:39 +07:00
ra_mbe ra_syntax: refactored the lexer design as per @matklad and @kiljacken PR review 2020-02-04 00:00:55 +02:00
ra_parser Add test for unnamed argument in function pointer 2020-02-12 22:55:37 +01:00
ra_prof Avoid premature pessimization 2020-02-02 18:56:37 +01:00
ra_project_model Add error context to failures in ra_project_model using anyhow crate (#3119) 2020-02-13 11:10:50 +01:00
ra_syntax Run cargo test 2020-02-12 23:15:48 +01:00
ra_text_edit move to to_usize() 2020-02-10 01:57:43 +02:00
ra_tt Refactoring 2019-12-18 13:10:37 +08:00
ra_vfs_glob Disable doctests 2019-11-17 18:35:05 +03:00
test_utils Simplify fixture parsing 2020-01-30 13:17:56 +01:00