-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tracking issue for Captures
trait
#56046
Comments
Maybe someone in @rust-lang/libs could kindly add the appropriate tags? |
Github is making the comments a nuisance to navigate. Is there a cliff-notes version of how this is different from (I imagine that, since it's a trait bound, it introduces invariance over |
@ExpHP I still don't 100% Niko's comment, but I think you're roughly right at least. It's definitely related to invariance somehow. Here is the comment, reproduced.
|
We do have this trait in rust/src/librustc/util/captures.rs Line 6 in 9d9c7ad
If we move it to rust/src/librustc/hir/print.rs Line 368 in 9d9c7ad
Captures available in core , an async fn foo<'a>() -> Bar could emit something like fn foo<'a>() -> impl SomeGeneratorThingy<Bar> + Captures<'a>
|
Since this trait is defined in Or is the plan to move the trait to
|
@SimonSapin Thanks. However, this issue is really superseded by #60670. And no, there is no unsoundness. The point is it is overly-restrictive at present. |
This solution was initially suggested by @nikomatsakis in this comment.
Steps:
Questions:
CC @alexcrichton
The text was updated successfully, but these errors were encountered: