Skip to content

Commit 2b11851

Browse files
committed
Raw Pointers are Constant PatKinds too
1 parent 430d6ed commit 2b11851

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

compiler/rustc_middle/src/thir.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -838,6 +838,8 @@ pub enum PatKind<'tcx> {
838838
/// * integer, bool, char or float (represented as a valtree), which will be handled by
839839
/// exhaustiveness to cover exactly its own value, similar to `&str`, but these values are
840840
/// much simpler.
841+
/// * raw pointers derived from integers, other raw pointers will have already resulted in an
842+
// error.
841843
/// * `String`, if `string_deref_patterns` is enabled.
842844
Constant {
843845
value: mir::Const<'tcx>,

0 commit comments

Comments
 (0)