rust/compiler/rustc_middle/src
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
..
dep_graph Allow query system to recover a HirId. 2022-10-01 15:58:42 +02:00
hir ImplItemKind::TyAlias => ImplItemKind::Type 2022-10-09 07:09:57 +00:00
infer Make ClosureOutlivesRequirement not rely on an unresolved type 2022-10-19 17:10:59 +00:00
middle Auto merge of #102026 - Bryanskiy:resolve_update, r=petrochenkov 2022-10-16 20:34:38 +00:00
mir Auto merge of #103227 - lcnr:bye-bye-unevaluated-const, r=oli-obk 2022-10-22 07:49:33 +00:00
query Auto merge of #102660 - camsteffen:uninhabited-perf, r=oli-obk 2022-10-23 03:39:43 +00:00
thir Use boxed slices in PatKind. 2022-09-02 07:26:22 +10:00
traits Make ClosureOutlivesRequirement not rely on an unresolved type 2022-10-19 17:10:59 +00:00
ty Rollup merge of #103414 - compiler-errors:rpit-print-lt, r=cjgillot 2022-10-23 14:48:17 -07:00
util span: move MultiSpan 2022-04-05 07:01:00 +01:00
arena.rs Rewrite representability 2022-10-07 09:33:46 -05:00
error.rs Migrate all diagnostics 2022-10-23 10:09:44 +02:00
lib.rs const_evaluatable_unchecked to const eval 2022-10-18 16:31:56 +02:00
lint.rs fix typo 2022-10-16 16:47:55 +02:00
macros.rs add inline to TrivialTypeTraversalImpls 2022-10-17 10:54:03 +02:00
metadata.rs rustc: Parameterize ty::Visibility over used ID 2022-09-07 13:35:41 +04:00
tests.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
thir.rs Use tidy-alphabetical in the compiler 2022-10-12 17:49:10 +05:30
values.rs Check representability in adt_sized_constraint 2022-10-10 14:36:12 -05:00