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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix implied_bounds_entailment lint #2

Merged
merged 1 commit into from Jan 12, 2023
Merged

Conversation

lcnr
Copy link
Contributor

@lcnr lcnr commented Jan 12, 2023

Hey 馃憢 this crate unintentionally relied on a soundness bug in the Rust compiler, see rust-lang/rust#105572 for more info. This lint will be a hard error in a future release and is fixed by this PR.

The issue was that inside of deref, we assume that Self::Target has to life to 'static even though that's never proven by the caller of deref because deref returns &'static Self::Target. Users of Deref for Static<T> always only used the signature of the trait method, so the stronger bound on the impl did not impact them.

@mciantyre
Copy link
Member

Thank you for fixing this here, and throughout the ecosystem!

@mciantyre mciantyre merged commit 1abb59a into imxrt-rs:master Jan 12, 2023
@lcnr lcnr deleted the patch-1 branch January 13, 2023 09:12
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.

None yet

2 participants