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

Fix fp in borrow_interior_mutable_const #5949

Merged
merged 2 commits into from
Aug 26, 2020

Conversation

rail-rain
Copy link
Contributor

fixes #5796

changelog: fix false positive in borrow_interior_mutable_const when referencing a field behind a pointer.

Fix false positive when referencing a field behind a pointer.
@rust-highfive
Copy link

r? @yaahc

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Aug 23, 2020
Co-authored-by: Thibaud <ThibsG@users.noreply.github.com>
Copy link
Member

@yaahc yaahc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me but I'm not confident I'm wrapping my head around all the ways references and consts interact so I'm going to defer to the rest of the clippy team on approval

cc @rust-lang/clippy

tests/ui/borrow_interior_mutable_const.rs Show resolved Hide resolved
@yaahc yaahc requested a review from flip1995 August 24, 2020 23:59
@Manishearth
Copy link
Member

r? @oli-obk on the "referecnes and consts" bit?

@rust-highfive rust-highfive assigned oli-obk and unassigned yaahc Aug 25, 2020
Copy link
Member

@flip1995 flip1995 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Waiting for @oli-obk

@oli-obk
Copy link
Contributor

oli-obk commented Aug 26, 2020

@bors r+

yea this makes sense. The only thing I'm wondering is whether we should move this lint to a MIR lint where I think we may be able to write a guaranteed-false-positive-free version since there'd be no more implicit things happening

@bors
Copy link
Collaborator

bors commented Aug 26, 2020

📌 Commit ce8915c has been approved by oli-obk

@bors
Copy link
Collaborator

bors commented Aug 26, 2020

⌛ Testing commit ce8915c with merge 9ef4479...

@bors
Copy link
Collaborator

bors commented Aug 26, 2020

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: oli-obk
Pushing 9ef4479 to master...

@bors bors merged commit 9ef4479 into rust-lang:master Aug 26, 2020
@rail-rain rail-rain deleted the fix_fp_borrow_interior_mutable_const branch August 26, 2020 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

borrow_interior_mutable_const should ignore UnsafeCells behind pointers
8 participants