Skip to content

Commit 1986c62

Browse files
committed
core: Make Range and RangeFrom derive Copy
This synces the implementations for RangeFull and RangeTo.
1 parent 588d37c commit 1986c62

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libcore/ops.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -974,7 +974,7 @@ impl fmt::Debug for RangeFull {
974974
}
975975

976976
/// A (half-open) range which is bounded at both ends.
977-
#[derive(Clone, PartialEq, Eq)]
977+
#[derive(Copy, Clone, PartialEq, Eq)]
978978
#[lang="range"]
979979
#[stable(feature = "rust1", since = "1.0.0")]
980980
pub struct Range<Idx> {
@@ -994,7 +994,7 @@ impl<Idx: fmt::Debug> fmt::Debug for Range<Idx> {
994994
}
995995

996996
/// A range which is only bounded below.
997-
#[derive(Clone, PartialEq, Eq)]
997+
#[derive(Copy, Clone, PartialEq, Eq)]
998998
#[lang="range_from"]
999999
#[stable(feature = "rust1", since = "1.0.0")]
10001000
pub struct RangeFrom<Idx> {

0 commit comments

Comments
 (0)