rust/tests/ui/closures/2229_closure_analysis/match
bors fdaaaf9f92 Auto merge of #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](https://github.com/rust-lang/rust/pull/116930#issuecomment-1784654073) for some more explanation and context.

Also fixes https://github.com/rust-lang/rust/issues/116929.

Cc `@oli-obk` `@lcnr`
2023-11-08 20:42:32 +00:00
..
auxiliary Move /src/test to /tests 2023-01-11 09:32:08 +00:00
if-let-guards-errors.e2018.stderr Capture scrutinee of if let guards correctly 2023-09-22 13:04:44 +00:00
if-let-guards-errors.e2021.stderr Capture scrutinee of if let guards correctly 2023-09-22 13:04:44 +00:00
if-let-guards-errors.rs Capture scrutinee of if let guards correctly 2023-09-22 13:04:44 +00:00
if-let-guards.rs Capture scrutinee of if let guards correctly 2023-09-22 13:04:44 +00:00
issue-87097.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-87097.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-87426.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-87988.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-88331.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-88331.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
match-edge-cases_1.rs make pointer_structural_match warn-by-default 2023-10-28 17:02:18 +02:00
match-edge-cases_1.stderr make pointer_structural_match warn-by-default 2023-10-28 17:02:18 +02:00
match-edge-cases_2.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
match-edge-cases_2.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
non-exhaustive-match.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
non-exhaustive-match.stderr Tweak spans for "adt defined here" note 2023-11-03 18:26:16 +01:00
pattern-matching-should-fail.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
pattern-matching-should-fail.stderr Run check_match and check_liveness when MIR is built instead of having an explicit phase for them 2023-04-21 22:32:38 +00:00
patterns-capture-analysis.rs Don't capture &[T; N] when contents isn't read 2023-06-15 11:42:20 +00:00
patterns-capture-analysis.stderr Don't capture &[T; N] when contents isn't read 2023-06-15 11:42:20 +00:00