]> git.lizzy.rs Git - rust.git/commit - src/tools/miri
Rollup merge of #81496 - guswynn:expected_async_block, r=oli-obk
authorDylan DPC <dylan.dpc@gmail.com>
Fri, 19 Feb 2021 01:49:00 +0000 (02:49 +0100)
committerGitHub <noreply@github.com>
Fri, 19 Feb 2021 01:49:00 +0000 (02:49 +0100)
commitf468fd1d23f41c926e9afdba989e7daf769e1f42
tree169694732e40e764bb6c48fb866e9a189290acb4
parent94ab4078da5190529dc1a22de742f01ef073204a
parent3e7ea401cd050320bf43f3bfcb1bfa97fc3a9b35
Rollup merge of #81496 - guswynn:expected_async_block, r=oli-obk

name async generators something more human friendly in type error diagnostic

fixes #81457

Some details:

1. I opted to load the generator kind from the hir in TyCategory. I also use 1 impl in the hir for the descr
2. I named both the source of the future, in addition to the general type (`future`), not sure what is preferred
3. I am not sure what is required to make sure "generator" is not referred to anywhere. A brief `rg "\"generator\"" showed me that most diagnostics correctly distinguish from generators and async generator, but the `descr` of `DefKind` is pretty general (not sure how thats used)
4. should the descr impl of AsyncGeneratorKind use its display impl instead of copying the string?
compiler/rustc_hir/src/hir.rs
compiler/rustc_infer/src/infer/error_reporting/mod.rs
compiler/rustc_infer/src/infer/error_reporting/need_type_info.rs
compiler/rustc_middle/src/ty/error.rs
compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs
compiler/rustc_typeck/src/check/method/suggest.rs