Matthias Krüger
49b05ed7c1
Rollup merge of #134742 - compiler-errors:post-borrowck-analysis, r=lcnr
...
Use `PostBorrowckAnalysis` in `check_coroutine_obligations`
This currently errors with:
```
error: concrete type differs from previous defining opaque type use
--> tests/ui/coroutine/issue-52304.rs:10:21
|
10 | pub fn example() -> impl Coroutine {
| ^^^^^^^^^^^^^^ expected `{example::{closure#0} upvar_tys=() resume_ty=() yield_ty=&'{erased} i32 return_ty=() witness={example::{closure#0}}}`, got `{example::{closure#0} upvar_tys=() resume_ty=() yield_ty=&'static i32 return_ty=() witness={example::{closure#0}}}`
|
= note: previous use here
```
This is because we end up redefining the opaque in `check_coroutine_obligations` but with the `yield_ty = &'erased i32` from hir typeck, which causes the *equality* check for opaques to fail.
The coroutine obligtions in question (when `-Znext-solver` is enabled) are:
```
Binder { value: TraitPredicate(<Opaque(DefId(0:5 ~ issue_52304[4c6d]::example::{opaque#0}), []) as std::marker::Sized>, polarity:Positive), bound_vars: [] }
Binder { value: AliasRelate(Term::Ty(Alias(Opaque, AliasTy { args: [], def_id: DefId(0:5 ~ issue_52304[4c6d]::example::{opaque#0}), .. })), Equate, Term::Ty(Coroutine(DefId(0:6 ~ issue_52304[4c6d]::example::{closure#0}), [(), (), &'{erased} i32, (), CoroutineWitness(DefId(0:6 ~ issue_52304[4c6d]::example::{closure#0}), []), ()]))), bound_vars: [] }
Binder { value: AliasRelate(Term::Ty(Coroutine(DefId(0:6 ~ issue_52304[4c6d]::example::{closure#0}), [(), (), &'{erased} i32, (), CoroutineWitness(DefId(0:6 ~ issue_52304[4c6d]::example::{closure#0}), []), ()])), Subtype, Term::Ty(Alias(Opaque, AliasTy { args: [], def_id: DefId(0:5 ~ issue_52304[4c6d]::example::{opaque#0}), .. }))), bound_vars: [] }
```
Ignoring the fact that we end up stalling some really dumb obligations here (lol), I think it makes more sense for us to be using post borrowck analysis for this check anyways.
r? lcnr
2025-01-06 20:59:31 +01:00
..
2024-04-24 08:05:29 +00:00
2024-12-25 01:08:59 +00:00
2024-04-24 08:05:29 +00:00
2024-09-25 08:45:40 +00:00
2024-11-02 03:08:04 +00:00
2024-12-05 14:14:17 -08:00
2024-01-13 12:46:58 -05:00
2024-11-22 11:12:15 -08:00
2024-11-22 11:12:15 -08:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2024-11-28 14:32:45 -08:00
2024-12-05 14:14:17 -08:00
2024-04-24 08:05:29 +00:00
2023-10-20 21:14:02 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 22:21:13 +00:00
2024-12-13 00:04:56 +00:00
2024-12-13 00:04:56 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-11-06 20:02:42 +01:00
2024-11-06 20:02:42 +01:00
2024-12-21 17:01:36 +01:00
2024-12-21 17:01:36 +01:00
2024-11-02 03:08:04 +00:00
2024-11-02 03:08:04 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-11-22 11:12:15 -08:00
2024-11-22 11:12:15 -08:00
2024-04-24 08:05:29 +00:00
2024-12-03 23:39:51 +00:00
2024-12-03 23:39:51 +00:00
2023-11-24 21:04:51 +01:00
2024-04-24 08:05:29 +00:00
2023-11-24 19:15:52 +01:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-07-21 22:32:29 -04:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-08-20 18:33:25 +02:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-12-12 23:36:27 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-10-29 16:26:57 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 22:21:13 +00:00
2024-11-22 11:12:15 -08:00
2024-11-22 11:12:15 -08:00
2024-11-22 11:12:15 -08:00
2024-11-22 11:12:15 -08:00
2024-11-22 11:12:15 -08:00
2024-11-02 03:08:04 +00:00
2024-11-22 11:12:15 -08:00
2024-11-22 11:12:15 -08:00
2024-11-22 11:12:15 -08:00
2024-06-27 15:19:08 -04:00
2024-11-22 11:12:15 -08:00
2023-10-30 16:32:53 +00:00
2024-04-24 08:05:29 +00:00
2024-08-10 14:32:55 +03:00
2024-11-22 11:12:15 -08:00
2024-11-22 11:12:15 -08:00
2024-11-22 11:12:15 -08:00
2024-01-13 12:46:58 -05:00
2024-06-04 14:19:42 -03:00
2024-11-22 11:12:15 -08:00
2024-08-03 02:28:59 +00:00
2024-08-03 02:28:59 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-07-21 22:32:29 -04:00
2024-12-25 01:27:27 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-02-16 20:02:50 +00:00
2024-12-31 15:11:18 +08:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-08-12 19:27:57 -07:00
2024-04-24 08:05:29 +00:00
2024-02-16 20:02:50 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-10-29 16:26:57 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-11-02 03:08:04 +00:00
2024-12-12 23:36:27 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-02-16 20:02:50 +00:00
2024-04-24 08:05:29 +00:00
2024-07-14 13:50:09 +09:00
2025-01-03 12:01:31 +01:00
2025-01-03 12:01:31 +01:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-06-12 08:53:59 +00:00
2024-06-12 08:53:59 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-12-12 23:36:27 +00:00
2024-06-12 08:53:59 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-08-20 18:33:25 +02:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-10-29 16:26:57 +00:00
2024-11-22 11:12:15 -08:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-12-12 23:36:27 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2023-10-20 21:14:02 +00:00
2024-04-24 08:05:29 +00:00
2024-07-21 22:32:29 -04:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-10-29 16:26:57 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-10-25 20:16:52 +00:00
2024-10-25 20:16:52 +00:00
2024-10-25 20:16:52 +00:00
2024-10-25 20:16:52 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-11-22 11:12:15 -08:00
2024-11-22 11:12:15 -08:00
2023-12-18 01:45:42 +00:00
2024-11-22 11:12:15 -08:00
2024-07-21 22:32:29 -04:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-05-19 19:23:38 -05:00
2024-05-19 19:23:38 -05:00
2024-05-19 19:23:38 -05:00
2024-09-13 14:10:56 +03:00
2024-11-02 16:58:50 +00:00
2024-11-02 16:58:50 +00:00
2024-12-27 19:58:16 +11:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-12-12 23:36:27 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-10-16 13:44:56 -04:00
2024-04-24 08:05:29 +00:00
2024-02-16 20:02:50 +00:00
2024-10-29 16:26:57 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-07-21 22:32:29 -04:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-12-12 23:36:27 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-10-29 16:26:57 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-07-21 22:32:29 -04:00
2024-04-24 08:05:29 +00:00
2024-07-21 22:32:29 -04:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-02-16 20:02:50 +00:00