]> git.lizzy.rs Git - rust.git/commit
Keep info on pre-desugaring expression for better "incorrect `.await`" suggestion
authorEsteban Kuber <esteban@kuber.com.ar>
Tue, 16 Nov 2021 20:07:23 +0000 (20:07 +0000)
committerEsteban Kuber <esteban@kuber.com.ar>
Mon, 13 Dec 2021 17:09:16 +0000 (17:09 +0000)
commitf640438b402b6507e734862026b0b004090c8ac0
treea193d31c6a2cb48b200138792f56346fc1fd4fe3
parentd45e030c04c19ce9c14787a793fd2e32674814d7
Keep info on pre-desugaring expression for better "incorrect `.await`" suggestion

Keep the `HirId` of `.await`ed expressions so in the case of a `fn` call
on on a sync `fn`, we can suggest maybe turning it into an `async fn`.
14 files changed:
compiler/rustc_ast_lowering/src/expr.rs
compiler/rustc_ast_lowering/src/lib.rs
compiler/rustc_hir/src/hir.rs
compiler/rustc_hir_pretty/src/lib.rs
compiler/rustc_lint/src/array_into_iter.rs
compiler/rustc_middle/src/traits/mod.rs
compiler/rustc_save_analysis/src/sig.rs
compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs
compiler/rustc_typeck/src/astconv/mod.rs
compiler/rustc_typeck/src/check/expr.rs
compiler/rustc_typeck/src/check/fn_ctxt/_impl.rs
compiler/rustc_typeck/src/check/fn_ctxt/checks.rs
src/test/ui/async-await/unnecessary-await.rs [new file with mode: 0644]
src/test/ui/async-await/unnecessary-await.stderr [new file with mode: 0644]