about summary refs log tree commit diff
path: root/compiler/rustc_query_impl/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-01-17 20:21:22 +0100
committerGitHub <noreply@github.com>2024-01-17 20:21:22 +0100
commitcd5eb6a896061b47127e228b0a7e8454cf55d925 (patch)
treea8c69fd2d210c5009e239d22cf3d02f93b9059f1 /compiler/rustc_query_impl/src
parent6ca77ff72237d16ebb535ecf86c0b9794f47f3ae (diff)
parent37a5464bc8e630beee4377ec7ccc0ee912291907 (diff)
downloadrust-cd5eb6a896061b47127e228b0a7e8454cf55d925.tar.gz
rust-cd5eb6a896061b47127e228b0a7e8454cf55d925.zip
Rollup merge of #120031 - compiler-errors:construct-closure-ty-eagerly, r=oli-obk
Construct closure type eagerly

Construct the returned closure type *before* checking the body, in the same match as we were previously deducing the coroutine types based off of the closure kind.

This simplifies some changes I'm doing in the async closure PR, and imo just seems easier to read (since we only need one match on closure kind, instead of two). There's no reason I can tell that we needed to create the closure type *after* the body was checked.

~~This also has the side-effect of making it so that the universe of the closure synthetic infer vars are lower than any infer vars that come from checking the body. We can also get rid of `next_root_ty_var` hack from closure checking (though in general we still need this, #119106). cc ```@lcnr``` since you may care about this hack 😆~~

r? ```@oli-obk```
Diffstat (limited to 'compiler/rustc_query_impl/src')
0 files changed, 0 insertions, 0 deletions