Eagerly instantiate closure/coroutine-like bounds with placeholders to deal with...
source link: https://github.com/rust-lang/rust/pull/122267
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Conversation
Member
A follow-up to #119849, however it aims to fix a different set of issues. Currently, we have trouble confirming goals where built-in closure/fnptr/coroutine signatures are compared against higher-ranked goals.
Currently, we don't support goals like for<'a> fn(&'a ()): Fn(&'a ())
because we don't expect the self type of goal to reference any bound regions from the goal, because we don't really know how to deal with the double binder of predicate + self type. However, this definitely can be reached (#121653) -- and in fact, it results in post-mono errors in the case of #112347 where the builtin type (e.g. a coroutine) is hidden behind a TAIT.
The proper fix here is to instantiate the goal before trying to extract the signature from the self type. See final two commits.
r? lcnr
Recommend
-
6
Contributor ThePuzzlemaker commented
-
2
Copy link Collaborator rust-log-analyzer c...
-
7
Copy link Contributor BoxyUwU commented
-
4
Could not instantiate SVGImageReader Exception in Scrimage Reading Time: < 1 minute
-
0
Eagerly anticipated Alto’s Odyssey: The Lost City surfs onto Apple Arcade this monthNews
-
3
Don’t explicitly instantiate
-
2
How to force ViewPager to re-instantiate its elements advertisements This question already has an answer here:
-
4
Flutter 报错: java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{**} Published on Feb 22, 2023 in with 0 comment
-
10
`skip_binder` to `instantiate_identity` by lcnr · Pull Request #116340 · rust-lang/rust · GitHub Skip to content...
-
3
5 ways to instantiate Rust structs in testsOctober 6, 2023 · About 10 minutes · Tags: programming, reada...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK