diff options
| author | Stuart Cook <Zalathar@users.noreply.github.com> | 2025-07-29 16:16:44 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-29 16:16:44 +1000 |
| commit | fce74bacf3fc25b76cc0d021877f64184aacc4ad (patch) | |
| tree | c941a8674766837d0e68fe52fb367d8559140bb9 /compiler/rustc_codegen_llvm/src/llvm/mod.rs | |
| parent | 0901e356c25c6543cbf61586ee17bfd1b294efb6 (diff) | |
| parent | 2b11851452364e07a3b0456a7a24424d944297fa (diff) | |
| download | rust-fce74bacf3fc25b76cc0d021877f64184aacc4ad.tar.gz rust-fce74bacf3fc25b76cc0d021877f64184aacc4ad.zip | |
Rollup merge of #144573 - BoxyUwU:patkind_constant_ptr_docs, r=lcnr
Raw Pointers are Constant PatKinds too
raw pointers can be matched on with a const pattern:
```rust
const FOO: *const u8 = core::ptr::null();
fn foo(a: *const u8) {
match a {
FOO => (),
_ => todo!(),
}
}
```
as far as I can tell this is represented with a `PatKind::Constant`: https://github.com/rust-lang/rust/blob/master/compiler/rustc_mir_build/src/thir/pattern/const_to_pat.rs#L333-L337
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/llvm/mod.rs')
0 files changed, 0 insertions, 0 deletions
