Skip to content

Commit

Permalink
Rollup merge of rust-lang#21846 - tbu-:pr_revert_uncopyable_range, r=
Browse files Browse the repository at this point in the history
 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
  • Loading branch information
Manishearth committed Apr 17, 2015
2 parents d612b18 + c4a1f6b commit 4f0f0e2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libcore/ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -974,7 +974,7 @@ impl fmt::Debug for RangeFull {
}

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

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

0 comments on commit 4f0f0e2

Please sign in to comment.