rust/compiler
Michael Howell 039e9b6b94
Rollup merge of #103414 - compiler-errors:rpit-print-lt, r=cjgillot
Pretty print lifetimes captured by RPIT

This specifically makes the output in #103409 change from:

```diff
  error: `impl` item signature doesn't match `trait` item signature
    --> $DIR/signature-mismatch.rs:15:5
     |
  LL |     fn async_fn(&self, buff: &[u8]) -> impl Future<Output = Vec<u8>>;
     |     ----------------------------------------------------------------- expected `fn(&'1 Struct, &'2 [u8]) -> impl Future<Output = Vec<u8>>`
  ...
  LL |     fn async_fn<'a>(&self, buff: &'a [u8]) -> impl Future<Output = Vec<u8>> + 'a {
-  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ found `fn(&'1 Struct, &'2 [u8]) -> impl Future<Output = Vec<u8>>`
+  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ found `fn(&'1 Struct, &'2 [u8]) -> impl Future<Output = Vec<u8>> + '2`
     |
     = note: expected `fn(&'1 Struct, &'2 [u8]) -> impl Future<Output = Vec<u8>>`
-               found `fn(&'1 Struct, &'2 [u8]) -> impl Future<Output = Vec<u8>>`
+               found `fn(&'1 Struct, &'2 [u8]) -> impl Future<Output = Vec<u8>> + '2`
     = help: the lifetime requirements from the `impl` do not correspond to the requirements in the `trait`
     = help: verify the lifetime relationships in the `trait` and `impl` between the `self` argument, the other inputs and its output

  error: aborting due to previous error
```

Along with the UI tests in this PR, which I think are all improvements!

r? `@oli-obk` though feel free to re-roll
2022-10-23 14:48:17 -07:00
..
rustc
rustc_apfloat
rustc_arena
rustc_ast Fix TyKind::is_simple_path. 2022-10-18 15:51:23 +11:00
rustc_ast_lowering Migrate all diagnostics 2022-10-23 10:09:44 +02:00
rustc_ast_passes Migrate all diagnostics 2022-10-23 10:09:44 +02:00
rustc_ast_pretty Rename AssocItemKind::TyAlias to AssocItemKind::Type 2022-10-10 02:31:37 +00:00
rustc_attr Migrate all diagnostics 2022-10-23 10:09:44 +02:00
rustc_borrowck Migrate all diagnostics 2022-10-23 10:09:44 +02:00
rustc_builtin_macros Migrate all diagnostics 2022-10-23 10:09:44 +02:00
rustc_codegen_cranelift more dupe word typos 2022-10-14 12:57:56 +08:00
rustc_codegen_gcc Migrate all diagnostics 2022-10-23 10:09:44 +02:00
rustc_codegen_llvm Introduce dedicated -Zdylib-lto flag for enabling LTO on dylibs 2022-10-23 13:48:03 +02:00
rustc_codegen_ssa Introduce dedicated -Zdylib-lto flag for enabling LTO on dylibs 2022-10-23 13:48:03 +02:00
rustc_const_eval Migrate all diagnostics 2022-10-23 10:09:44 +02:00
rustc_data_structures fix some typos 2022-10-21 18:04:00 +08:00
rustc_driver Migrate all diagnostics 2022-10-23 10:09:44 +02:00
rustc_error_codes fix small word dupe typos 2022-10-13 00:53:46 +08:00
rustc_error_messages Introduce dedicated -Zdylib-lto flag for enabling LTO on dylibs 2022-10-23 13:48:03 +02:00
rustc_errors Auto merge of #103431 - Dylan-DPC:rollup-oozfo89, r=Dylan-DPC 2022-10-23 11:33:18 +00:00
rustc_expand Migrate all diagnostics 2022-10-23 10:09:44 +02:00
rustc_feature Add code comments and documentation 2022-10-20 22:44:10 +00:00
rustc_fs_util
rustc_graphviz
rustc_hir Use tidy-alphabetical in the compiler 2022-10-12 17:49:10 +05:30
rustc_hir_analysis Auto merge of #103345 - Nilstrieb:diag-flat, r=compiler-errors 2022-10-23 09:06:39 +00:00
rustc_hir_pretty pretty: fix to print some lifetimes on HIR pretty-print 2022-10-15 23:34:21 +09:00
rustc_hir_typeck Auto merge of #103431 - Dylan-DPC:rollup-oozfo89, r=Dylan-DPC 2022-10-23 11:33:18 +00:00
rustc_incremental Rollup merge of #102829 - compiler-errors:rename-impl-item-kind, r=TaKO8Ki 2022-10-10 00:09:42 +09:00
rustc_index Remove from compiler/ crates 2022-09-29 16:49:04 +09:00
rustc_infer Auto merge of #103345 - Nilstrieb:diag-flat, r=compiler-errors 2022-10-23 09:06:39 +00:00
rustc_interface Introduce dedicated -Zdylib-lto flag for enabling LTO on dylibs 2022-10-23 13:48:03 +02:00
rustc_lexer Remove from compiler/ crates 2022-09-29 16:49:04 +09:00
rustc_lint Rollup merge of #103402 - joshtriplett:niche-wrap-fix, r=oli-obk 2022-10-23 14:48:17 -07:00
rustc_lint_defs Rollup merge of #102635 - lcnr:incoherent_auto_trait_objects, r=jackh726 2022-10-22 00:13:59 +02:00
rustc_llvm Avoid LLVM-deprecated Optional::hasValue 2022-09-26 16:51:18 -07:00
rustc_log
rustc_macros Migrate all diagnostics 2022-10-23 10:09:44 +02:00
rustc_metadata Auto merge of #103431 - Dylan-DPC:rollup-oozfo89, r=Dylan-DPC 2022-10-23 11:33:18 +00:00
rustc_middle Rollup merge of #103414 - compiler-errors:rpit-print-lt, r=cjgillot 2022-10-23 14:48:17 -07:00
rustc_mir_build Introduce InhabitedPredicate 2022-10-22 13:20:06 -05:00
rustc_mir_dataflow Migrate all diagnostics 2022-10-23 10:09:44 +02:00
rustc_mir_transform Introduce deduced parameter attributes, and use them for deducing readonly on 2022-10-21 02:33:15 -07:00
rustc_monomorphize Migrate all diagnostics 2022-10-23 10:09:44 +02:00
rustc_parse Auto merge of #103431 - Dylan-DPC:rollup-oozfo89, r=Dylan-DPC 2022-10-23 11:33:18 +00:00
rustc_parse_format Detect and reject out-of-range integers in format string literals 2022-10-01 01:05:01 +02:00
rustc_passes Migrate all diagnostics 2022-10-23 10:09:44 +02:00
rustc_plugin_impl Migrate all diagnostics 2022-10-23 10:09:44 +02:00
rustc_privacy Migrate all diagnostics 2022-10-23 10:09:44 +02:00
rustc_query_impl Introduce deduced parameter attributes, and use them for deducing readonly on 2022-10-21 02:33:15 -07:00
rustc_query_system Migrate all diagnostics 2022-10-23 10:09:44 +02:00
rustc_resolve Rollup merge of #103140 - chenyukang:yukang/fix-103112, r=estebank 2022-10-23 14:48:15 -07:00
rustc_save_analysis Migrate all diagnostics 2022-10-23 10:09:44 +02:00
rustc_serialize remove cfg(bootstrap) 2022-09-26 10:14:45 +02:00
rustc_session Introduce dedicated -Zdylib-lto flag for enabling LTO on dylibs 2022-10-23 13:48:03 +02:00
rustc_smir Only keep one version of ImplicitSelfKind. 2022-09-13 19:18:23 +02:00
rustc_span fix rust-lang#101880: suggest let for assignment, and some code refactor 2022-10-20 22:54:02 +08:00
rustc_symbol_mangling Migrate all diagnostics 2022-10-23 10:09:44 +02:00
rustc_target Split is_stable from rustc_target::spec::abi::is_enabled. 2022-10-19 12:41:11 +02:00
rustc_trait_selection Auto merge of #103345 - Nilstrieb:diag-flat, r=compiler-errors 2022-10-23 09:06:39 +00:00
rustc_traits rm try_normalize_mir_const_after_erasing_regions 2022-10-17 10:54:03 +02:00
rustc_transmute Remove TypeckResults from InferCtxt 2022-10-07 07:06:19 -05:00
rustc_ty_utils Migrate all diagnostics 2022-10-23 10:09:44 +02:00
rustc_type_ir Deny const variables as well 2022-10-19 17:11:40 +00:00