Skip to content

Commit 1f897d1

Browse files
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]>
2 parents 6f2cab1 + e4f4cd7 commit 1f897d1

File tree

2 files changed

+545
-45
lines changed

2 files changed

+545
-45
lines changed

0 commit comments

Comments
 (0)