Closed
Description
Seen in #79735
I tried this code:
fn foo(ptr: *const bool) {
let _ = *ptr;
}
Which, oddly, happily compiled despite the syntactic pointer dereference.
Back in 1.21, however, that gave the expected error:
error[E0133]: dereference of raw pointer requires unsafe function or block
--> <source>:2:13
|
2 | let _ = *ptr;
| ^^^^ dereference of raw pointer
error: aborting due to previous 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.