Commit a5574ea
committed
Auto merge of rust-lang#116930 - RalfJung:raw-ptr-match, r=davidtwco
patterns: reject raw pointers that are not just integers
Matching against `0 as *const i32` is fine, matching against `&42 as *const i32` is not.
This extends the existing check against function pointers and wide pointers: we now uniformly reject all these pointer types during valtree construction, and then later lint because of that. See [here](rust-lang#116930 (comment)) for some more explanation and context.
Also fixes rust-lang#116929.
Cc `@oli-obk` `@lcnr`1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
253 | 253 | | |
254 | 254 | | |
255 | 255 | | |
| 256 | + | |
256 | 257 | | |
257 | 258 | | |
258 | 259 | | |
| |||
0 commit comments