Skip to content

Commit 7c6960e

Browse files
committed
Document invariant in thir::PatRange
1 parent 205319d commit 7c6960e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

compiler/rustc_middle/src/thir.rs

+2
Original file line numberDiff line numberDiff line change
@@ -815,7 +815,9 @@ pub enum PatKind<'tcx> {
815815
/// The boundaries must be of the same type and that type must be numeric.
816816
#[derive(Clone, Debug, PartialEq, HashStable, TypeVisitable)]
817817
pub struct PatRange<'tcx> {
818+
/// Must not be `PosInfinity`.
818819
pub lo: PatRangeBoundary<'tcx>,
820+
/// Must not be `NegInfinity`.
819821
pub hi: PatRangeBoundary<'tcx>,
820822
#[type_visitable(ignore)]
821823
pub end: RangeEnd,

0 commit comments

Comments
 (0)