-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Unsafe checking skips pointer dereferences in unused places #80059
Copy link
Copy link
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.P-mediumMedium priorityMedium priorityT-langRelevant to the language teamRelevant to the language teamfixed-by-thir-unsafeck`-Z thir-unsafeck` handles this correctly.`-Z thir-unsafeck` handles this correctly.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.P-mediumMedium priorityMedium priorityT-langRelevant to the language teamRelevant to the language teamfixed-by-thir-unsafeck`-Z thir-unsafeck` handles this correctly.`-Z thir-unsafeck` handles this correctly.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Seen in #79735
I tried this code:
https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=44e42a069bc7601365f5f21a102178d9
Which, oddly, happily compiled despite the syntactic pointer dereference.
Back in 1.21, however, that gave the expected error:
https://rust.godbolt.org/z/rP93nf
The conversation in the 2020-12-15 lang team meeting implied that this was an unexpected regression, so opening and nomination for further discussion.