about summary refs log tree commit diff
path: root/compiler/rustc_middle/src
diff options
context:
space:
mode:
authorBoxy <rust@boxyuwu.dev>2025-07-28 09:59:57 +0100
committerBoxy <rust@boxyuwu.dev>2025-07-28 10:13:19 +0100
commit2b11851452364e07a3b0456a7a24424d944297fa (patch)
treef3e61026f7ceef935d6d47dbfced8e9833cc7a74 /compiler/rustc_middle/src
parent430d6eddfc6a455ca4a0137c0822a982cccd3b2b (diff)
downloadrust-2b11851452364e07a3b0456a7a24424d944297fa.tar.gz
rust-2b11851452364e07a3b0456a7a24424d944297fa.zip
Raw Pointers are Constant PatKinds too
Diffstat (limited to 'compiler/rustc_middle/src')
-rw-r--r--compiler/rustc_middle/src/thir.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_middle/src/thir.rs b/compiler/rustc_middle/src/thir.rs
index 730c1147684..3dd6d2c8928 100644
--- a/compiler/rustc_middle/src/thir.rs
+++ b/compiler/rustc_middle/src/thir.rs
@@ -838,6 +838,8 @@ pub enum PatKind<'tcx> {
     /// * integer, bool, char or float (represented as a valtree), which will be handled by
     ///   exhaustiveness to cover exactly its own value, similar to `&str`, but these values are
     ///   much simpler.
+    /// * raw pointers derived from integers, other raw pointers will have already resulted in an
+    //    error.
     /// * `String`, if `string_deref_patterns` is enabled.
     Constant {
         value: mir::Const<'tcx>,