Skip to content

Enforce Copy bounds for repeat elements while considering lifetimes#95819

Merged
bors merged 5 commits intorust-lang:masterfrom
oli-obk:mir_can't_hold_all_these_lifetimes
Apr 29, 2022
Merged

Enforce Copy bounds for repeat elements while considering lifetimes#95819
bors merged 5 commits intorust-lang:masterfrom
oli-obk:mir_can't_hold_all_these_lifetimes

Conversation

@oli-obk
Copy link
Contributor

@oli-obk oli-obk commented Apr 8, 2022

fixes #95477

this is a breaking change in order to fix a soundness bug.

Before this PR we only checked whether the repeat element type had an impl Copy, but not whether that impl also had the appropriate lifetimes. E.g. if the impl was for YourType<'static> and not a general 'a, then copying any type other than a 'static one should have been rejected, but wasn't.

r? @lcnr

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. finished-final-comment-period The final comment period is finished for this PR / Issue. merged-by-bors This PR was explicitly merged by bors. perf-regression Performance regression. perf-regression-triaged The performance regression has been triaged. relnotes Marks issues that should be documented in the release notes of the next release. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-lang Relevant to the language team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

repeat expression do not honor lt bounds of copy