Skip to content

Commit 9d8d767

Browse files
authored
Rollup merge of #142339 - oli-obk:not-null-pattern-types, r=BoxyUwU
Add NonNull pattern types These are the final piece missing for * rust-lang/rust#136006 We cannot use the previous scheme of using an integer range for raw pointers, as we're not just changing the layout of raw pointers anymore, but also the type representation. And we can't represent "any provenance or NonZero<usize>" natively as patterns. So I created a new `!null` pattern. Since this is all unstable representation stuff for replacing rustc_layout_scalar_range_start with pattern types, the divergence from normal patterns is fine, especially since T-lang seems interested in exploring general negation patterns r? `@BoxyUwU`
2 parents 1c0e367 + d718408 commit 9d8d767

File tree

1 file changed

+1
-0
lines changed
  • rustc_public/src/unstable/convert/stable

1 file changed

+1
-0
lines changed

rustc_public/src/unstable/convert/stable/ty.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,7 @@ impl<'tcx> Stable<'tcx> for ty::Pattern<'tcx> {
485485
end: Some(end.stable(tables, cx)),
486486
include_end: true,
487487
},
488+
ty::PatternKind::NotNull => todo!(),
488489
ty::PatternKind::Or(_) => todo!(),
489490
}
490491
}

0 commit comments

Comments
 (0)