This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -1135,8 +1135,10 @@ pub enum ProjectionElem<V, T> {
11351135 ConstantIndex {
11361136 /// index or -index (in Python terms), depending on from_end
11371137 offset : u64 ,
1138- /// The thing being indexed must be at least this long. For arrays this
1139- /// is always the exact length.
1138+ /// The thing being indexed must be at least this long -- otherwise, the
1139+ /// projection is UB.
1140+ ///
1141+ /// For arrays this is always the exact length.
11401142 min_length : u64 ,
11411143 /// Counting backwards from end? This is always false when indexing an
11421144 /// array.
Original file line number Diff line number Diff line change @@ -768,8 +768,10 @@ pub enum ProjectionElem {
768768 ConstantIndex {
769769 /// index or -index (in Python terms), depending on from_end
770770 offset : u64 ,
771- /// The thing being indexed must be at least this long. For arrays this
772- /// is always the exact length.
771+ /// The thing being indexed must be at least this long -- otherwise, the
772+ /// projection is UB.
773+ ///
774+ /// For arrays this is always the exact length.
773775 min_length : u64 ,
774776 /// Counting backwards from end? This is always false when indexing an
775777 /// array.
You can’t perform that action at this time.
0 commit comments