Skip to content

Commit

Permalink
Auto merge of #116930 - RalfJung:raw-ptr-match, r=davidtwco
Browse files Browse the repository at this point in the history
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/rust#116930 (comment)) for some more explanation and context.

Also fixes rust-lang/rust#116929.

Cc `@oli-obk` `@lcnr`
  • Loading branch information
bors committed Nov 8, 2023
2 parents 30b7c14 + de13b54 commit 532202a
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit 532202a

Please sign in to comment.