rust/compiler/rustc_mir
Dylan DPC 99f16e637b
Rollup merge of #76468 - SNCPlay42:lifetime-names, r=Mark-Simulacrum
Improve lifetime name annotations for closures & async functions

* Don't refer to async functions as "generators" in error output
* Where possible, emit annotations pointing exactly at the `&` in the return type of closures (when they have explicit return types) and async functions, like we do for arguments.
Addresses #74072, but I wouldn't call that *closed* until annotations are identical for async and non-async functions.
* Emit a better annotation when the lifetime doesn't appear in the full name type, which currently happens for opaque types like `impl Future`. Addresses #74497, but further improves could probably be made (why *doesn't* it appear in the type as `impl Future + '1`?)
This is included in the same PR because the changes to `give_name_if_anonymous_region_appears_in_output` would introduce ICE otherwise (it would return `None` in cases where it didn't previously, which then gets `unwrap`ped)
2020-11-09 19:06:39 +01:00
..
src Rollup merge of #76468 - SNCPlay42:lifetime-names, r=Mark-Simulacrum 2020-11-09 19:06:39 +01:00
Cargo.toml Use tracing spans to trace the entire MIR interp stack 2020-09-28 20:07:57 +02:00