Matthias Krüger
692d764e53
Rollup merge of #114267 - compiler-errors:rpitit-opaque-bounds, r=spastorino
...
Map RPITIT's opaque type bounds back from projections to opaques
An RPITIT in a program's AST is eventually translated into both a projection GAT and an opaque. The opaque is used for default trait methods, like:
```
trait Foo {
fn bar() -> impl Sized { 0i32 }
}
```
The item bounds for both the projection and opaque are identical, and both have a *projection* self ty. This is mostly okay, since we can normalize this projection within the default trait method body to the opaque, but it does two things:
1. it leads to bugs in places where we don't normalize item bounds, like `deduce_future_output_from_obligations`
2. it leads to extra match arms that are both suspicious looking and also easy to miss
This PR maps the opaque type bounds of the RPITIT's *opaque* back to the opaque's self type to avoid this quirk. Then we can fix the UI test for #108304 (1.) and also remove a bunch of match arms (2.).
Fixes #108304
r? `@spastorino`
2023-07-31 16:57:55 +02:00
..
2023-02-23 10:27:06 -07:00
2023-07-31 16:57:55 +02:00
2023-07-07 13:13:18 +00:00
2023-03-22 21:12:40 -07:00
2023-05-25 02:45:14 +00:00
2023-05-25 02:45:14 +00:00
2023-04-12 16:17:31 +00:00
2023-04-12 16:17:31 +00:00
2023-04-12 16:17:31 +00:00
2023-07-06 11:37:19 +02:00
2023-07-05 07:43:35 +00:00
2023-07-18 21:53:34 -04:00
2023-07-27 04:00:49 +00:00
2023-01-11 21:40:39 +00:00
2023-02-16 15:14:45 +11:00
2023-06-18 22:52:30 +00:00
2023-06-18 22:52:30 +00:00
2023-06-18 22:52:30 +00:00
2023-07-07 13:13:18 +00:00
2023-07-14 12:35:33 +00:00
2023-06-11 00:19:56 +00:00
2023-06-11 00:19:56 +00:00
2023-05-18 01:53:01 +00:00
2023-05-18 01:53:01 +00:00
2023-02-22 09:44:26 +08:00
2023-01-30 21:51:33 +00:00
2023-06-27 23:31:06 +00:00
2023-05-13 10:51:21 +02:00
2023-05-13 10:51:21 +02:00
2023-05-13 10:51:21 +02:00
2023-01-15 19:46:20 +00:00
2023-03-03 05:02:34 +00:00
2023-07-30 17:15:55 +02:00
2023-07-30 17:15:55 +02:00
2023-01-11 21:30:10 +00:00
2023-01-11 21:30:10 +00:00
2023-04-06 23:01:40 -04:00
2023-05-12 10:26:50 +00:00
2023-06-22 15:00:12 +00:00
2023-07-07 13:13:18 +00:00
2023-07-07 13:13:18 +00:00
2023-04-20 15:06:17 -03:00
2023-04-12 16:17:31 +00:00
2023-01-27 20:10:17 +00:00
2023-01-27 18:58:13 +00:00
2023-01-27 18:58:13 +00:00
2023-04-12 16:17:31 +00:00
2023-07-03 21:40:04 +00:00
2023-07-03 21:40:04 +00:00
2023-04-12 16:17:31 +00:00
2023-02-13 16:23:23 +01:00
2023-07-15 22:02:16 +00:00
2023-05-16 16:02:17 +00:00
2023-05-16 16:02:17 +00:00
2023-05-16 16:02:17 +00:00
2023-07-05 07:43:35 +00:00
2023-07-05 07:43:35 +00:00
2023-04-16 09:58:08 +00:00
2023-04-16 09:58:08 +00:00
2023-05-31 17:45:45 +00:00
2023-05-31 17:45:45 +00:00
2023-03-03 05:02:34 +00:00
2023-02-22 21:52:26 +00:00
2023-01-11 19:46:45 +00:00
2023-01-11 19:46:45 +00:00
2023-06-16 19:39:48 +00:00
2023-03-23 06:19:52 +00:00
2023-06-16 19:39:48 +00:00
2023-06-16 19:39:48 +00:00
2023-03-23 06:19:52 +00:00
2023-03-03 05:02:34 +00:00
2023-04-12 22:50:10 +00:00
2023-06-27 21:36:15 +00:00
2023-07-27 15:51:02 +00:00
2023-07-27 15:51:02 +00:00
2023-01-30 20:12:19 +00:00
2023-05-18 01:53:01 +00:00
2023-05-18 01:53:01 +00:00
2023-01-11 19:46:45 +00:00
2023-07-06 11:37:21 +02:00
2023-01-21 05:49:36 +00:00
2023-01-21 05:49:36 +00:00
2023-07-06 11:37:21 +02:00
2023-07-06 11:37:21 +02:00
2023-07-06 11:37:21 +02:00
2023-07-06 11:37:21 +02:00
2023-06-16 19:39:48 +00:00
2023-06-22 15:51:19 +00:00
2023-06-16 19:39:48 +00:00
2023-06-16 19:39:48 +00:00
2023-03-03 05:02:34 +00:00
2023-07-07 16:02:25 +00:00
2023-06-26 01:11:44 +09:00
2023-03-03 05:02:34 +00:00
2023-04-12 16:17:31 +00:00
2023-04-12 22:50:10 +00:00
2023-06-26 19:14:49 +00:00
2023-06-26 19:14:49 +00:00
2023-01-30 20:12:19 +00:00
2023-04-25 19:53:09 +00:00
2023-04-12 16:17:31 +00:00
2023-04-12 16:17:31 +00:00