rust-analyzer/crates/hir-ty/src/tests
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
..
coercion.rs fix: infer lhs first on ordinary assignment expressions 2022-07-03 03:29:02 +09:00
diagnostics.rs style: rename crates to kebab case 2022-05-01 10:48:58 +00:00
display_source_code.rs style: rename crates to kebab case 2022-05-01 10:48:58 +00:00
incremental.rs style: rename crates to kebab case 2022-05-01 10:48:58 +00:00
macros.rs Add tests for #12669 2022-07-01 19:00:07 +02:00
method_resolution.rs style: rename crates to kebab case 2022-05-01 10:48:58 +00:00
never_type.rs style: rename crates to kebab case 2022-05-01 10:48:58 +00:00
patterns.rs fix: infer byte string pattern as &[u8] when matched against slices 2022-08-10 19:17:13 +09:00
regression.rs Fix lowering of empty macro expressions in trailing position 2022-08-15 18:01:58 +02:00
simple.rs fix: report type mismatch on identifier in destructuring assignments 2022-07-03 03:29:15 +09:00
traits.rs Auto merge of #12982 - jridgewell:into_future, r=Veykril 2022-08-18 07:37:47 +00:00