Skip to content
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

"fishy" skip_binder actually ignoring bound variables #104825

Closed
oli-obk opened this issue Nov 24, 2022 · 2 comments · Fixed by #104841
Closed

"fishy" skip_binder actually ignoring bound variables #104825

oli-obk opened this issue Nov 24, 2022 · 2 comments · Fixed by #104841
Assignees
Labels
A-closures Area: Closures (`|…| { … }`) C-bug Category: This is a bug. T-types Relevant to the types team, which will review and decide on the PR/issue.

Comments

@oli-obk
Copy link
Contributor

oli-obk commented Nov 24, 2022

    An `expect` there actually does panic for the `src/test/ui/generator/resume-arg-late-bound.rs` test.

I only moved this code between the files, the same comment and code pattern exists as well for normal closures:

// (1) Feels icky to skip the binder here, but OTOH we know

Originally posted by @Swatinem in #104321 (comment)

@oli-obk oli-obk added A-closures Area: Closures (`|…| { … }`) C-bug Category: This is a bug. T-types Relevant to the types team, which will review and decide on the PR/issue. labels Nov 24, 2022
@compiler-errors compiler-errors self-assigned this Nov 24, 2022
@compiler-errors
Copy link
Member

I couldn't repro this failure, maybe @Swatinem was doing .no_bound_vars().self_ty() instead of .self_ty().no_bound_vars()? The ordering is important here.

@Swatinem
Copy link
Contributor

I believe I did, yes.

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Nov 25, 2022
…=jackh726

Assert that we don't capture escaping bound vars in `Fn` trait selection

Fixes rust-lang#104825
@bors bors closed this as completed in 34f1de8 Nov 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-closures Area: Closures (`|…| { … }`) C-bug Category: This is a bug. T-types Relevant to the types team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants