Skip to content

Commit 4f0f0e2

Browse files
committed
Rollup merge of rust-lang#21846 - tbu-:pr_revert_uncopyable_range, r=
This reverts commit c3841b9. The commit made it impossible to copy the pretty fundamental data type `Range` and `RangeFrom`, which e.g. means that they can't be used in otherwise copyable structures anymore (or `Cell`s for that matter), where the reason for removal was that it can *also be used as an iterator*. CC @japaric rust-lang#21809
2 parents d612b18 + c4a1f6b commit 4f0f0e2

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)