Skip to content

Commit f8d30f9

Browse files
author
Jorge Aparicio
committed
impl Pod for Range
1 parent efb4cc4 commit f8d30f9

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/libcore/ops.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -977,6 +977,7 @@ impl fmt::Debug for RangeFull {
977977
}
978978
}
979979

980+
#[cfg(stage0)]
980981
/// A (half-open) range which is bounded at both ends.
981982
#[derive(Clone, PartialEq, Eq)]
982983
#[lang="range"]
@@ -988,6 +989,18 @@ pub struct Range<Idx> {
988989
pub end: Idx,
989990
}
990991

992+
#[cfg(not(stage0))]
993+
/// A (half-open) range which is bounded at both ends.
994+
#[derive(Clone, Eq, PartialEq, Pod)]
995+
#[lang="range"]
996+
#[stable(feature = "rust1", since = "1.0.0")]
997+
pub struct Range<Idx> {
998+
/// The lower bound of the range (inclusive).
999+
pub start: Idx,
1000+
/// The upper bound of the range (exclusive).
1001+
pub end: Idx,
1002+
}
1003+
9911004
#[stable(feature = "rust1", since = "1.0.0")]
9921005
impl<Idx: fmt::Debug> fmt::Debug for Range<Idx> {
9931006
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {

0 commit comments

Comments
 (0)