rust-analyzer/crates/hir-ty/src
bors 1da9156b0d Auto merge of #12982 - jridgewell:into_future, r=Veykril
Implement IntoFuture type inference

One of my projects is using [IntoFuture](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) to make our async code a little less verbose. However, rust-analyzer can't infer the output type of an await expression if the value uses `IntoFuture` to convert into another type. So we're getting `{unknown}` types everywhere since switching.

`foo.await` itself [desugars](e4417cf020/compiler/rustc_ast_lowering/src/expr.rs (L644-L658)) into a `match into_future(foo) {}`, with every `Future` impl getting a [default](e4417cf020/library/core/src/future/into_future.rs (L131-L139)) `IntoFuture` implementation. I'm not sure if we want to disable the old `future_trait` paths, since this only recently [stabilize](https://github.com/rust-lang/rust/pull/98718).
2022-08-18 07:37:47 +00:00
..
consteval style: rename crates to kebab case 2022-05-01 10:48:58 +00:00
diagnostics fix: consider assignee expressions in record fields exhaustiveness check 2022-07-24 22:40:04 +09:00
infer fix: infer byte string pattern as &[u8] when matched against slices 2022-08-10 19:17:13 +09:00
tests Auto merge of #12982 - jridgewell:into_future, r=Veykril 2022-08-18 07:37:47 +00:00
autoderef.rs Run cargo fmt 2022-07-20 15:06:15 +02:00
builder.rs Run cargo fix --edition-idioms 2022-07-20 15:02:08 +02:00
chalk_db.rs fix: #12441 False-positive type-mismatch error with generic future 2022-06-03 10:47:41 +08:00
chalk_ext.rs fix: Honor ref expressions for compute_ref_match completions 2022-07-27 13:48:26 +02:00
consteval.rs remove imports that are also in edition 2021's prelude 2022-08-09 01:16:32 +02:00
db.rs fix: Fix trait_impls_in_deps_query being called directly instead of as a query 2022-07-21 10:23:07 +02:00
diagnostics.rs style: rename crates to kebab case 2022-05-01 10:48:58 +00:00
display.rs Run cargo fmt 2022-07-20 15:06:15 +02:00
infer.rs Implement IntoFuture type inference 2022-08-08 21:05:56 -04:00
interner.rs Run cargo fix --edition-idioms 2022-07-20 15:02:08 +02:00
lib.rs Auto merge of #12841 - Veykril:query-fix, r=Veykril 2022-07-21 08:23:19 +00:00
lower.rs fix: resolve associated types of bare dyn types 2022-08-18 07:05:41 +09:00
mapping.rs style: rename crates to kebab case 2022-05-01 10:48:58 +00:00
method_resolution.rs feat: Handle operators like their trait functions in the IDE 2022-08-05 14:16:36 +02:00
primitive.rs style: rename crates to kebab case 2022-05-01 10:48:58 +00:00
test_db.rs Run cargo fix --edition-idioms 2022-07-20 15:02:08 +02:00
tests.rs style: rename crates to kebab case 2022-05-01 10:48:58 +00:00
tls.rs Run cargo fix --edition-idioms 2022-07-20 15:02:08 +02:00
traits.rs Increase defalt chalk overflow depth to match max solver size 2022-05-22 18:10:38 +03:00
utils.rs Run cargo fix --edition-idioms 2022-07-20 15:02:08 +02:00
walk.rs style: rename crates to kebab case 2022-05-01 10:48:58 +00:00