Commit b132ea7
authored
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-L337File tree
0 file changed
+0
-0
lines changed0 file changed
+0
-0
lines changed
0 commit comments