Skip to content

Remove (incorrect) unused ?Sized bound #8

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

Merged
merged 1 commit into from
Aug 7, 2024

Conversation

compiler-errors
Copy link
Contributor

This crate may break in rust-lang/rust#123531.

The K: ?Sized bound is unused by any of the code in the library, and also isn't even theoretically able to be used either (Rust only allows the last field of a tuple to be unsized).

The Rust compiler wasn't checking the validity of closure arguments before rust-lang/rust#123531 -- therefore it didn't see that the argument &(K, V) was invalid in the closure being returned by equivalent_key, since Rust requires K to be Sized in order to be in the non-final position of a tuple.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants