Skip to content

fix implied_bounds_entailment lint#2

Merged
mciantyre merged 1 commit intoimxrt-rs:masterfrom
lcnr:patch-1
Jan 12, 2023
Merged

fix implied_bounds_entailment lint#2
mciantyre merged 1 commit intoimxrt-rs:masterfrom
lcnr:patch-1

Conversation

@lcnr
Copy link
Copy Markdown
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
Copy Markdown
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.

2 participants