diff options
| author | bors <bors@rust-lang.org> | 2015-02-01 10:14:51 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-02-01 10:14:51 +0000 |
| commit | f1f9cb705df95171fce4e575374c959509e58dea (patch) | |
| tree | 78bc0ff576925ce665ec443dcfe54c472dbad66f /src | |
| parent | fe4340ab18abc53af40e40a6696dfbe2375238b0 (diff) | |
| parent | c3841b9c9f35f4e7fed9894558cbe1f068a3e01a (diff) | |
| download | rust-f1f9cb705df95171fce4e575374c959509e58dea.tar.gz rust-f1f9cb705df95171fce4e575374c959509e58dea.zip | |
Auto merge of #21809 - japaric:no-copy, r=alexcrichton
Removes `Copy` from `ops::Range` (`a..b`) and `ops::RangeFrom` (`a..`) [breaking-change] --- I forgot about these two in #20790, this PR also adds `Clone` to the `Peekable` adapter which used to be `Copy`able. r? @nikomatsakis or anyone
Diffstat (limited to 'src')
| -rw-r--r-- | src/libcore/iter.rs | 1 | ||||
| -rw-r--r-- | src/libcore/ops.rs | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/libcore/iter.rs b/src/libcore/iter.rs index b0906651da8..751b5959d8b 100644 --- a/src/libcore/iter.rs +++ b/src/libcore/iter.rs @@ -1824,6 +1824,7 @@ impl<I> RandomAccessIterator for Enumerate<I> where I: RandomAccessIterator { } /// An iterator with a `peek()` that returns an optional reference to the next element. +#[derive(Clone)] #[must_use = "iterator adaptors are lazy and do nothing unless consumed"] #[stable(feature = "rust1", since = "1.0.0")] pub struct Peekable<T, I> where I: Iterator<Item=T> { diff --git a/src/libcore/ops.rs b/src/libcore/ops.rs index 4b19d29330b..f656fd4b8b9 100644 --- a/src/libcore/ops.rs +++ b/src/libcore/ops.rs @@ -977,7 +977,7 @@ impl fmt::Debug for RangeFull { } /// A (half-open) range which is bounded at both ends. -#[derive(Copy, Clone, PartialEq, Eq)] +#[derive(Clone, PartialEq, Eq)] #[lang="range"] #[stable(feature = "rust1", since = "1.0.0")] pub struct Range<Idx> { @@ -995,7 +995,7 @@ impl<Idx: fmt::Debug> fmt::Debug for Range<Idx> { } /// A range which is only bounded below. -#[derive(Copy, Clone, PartialEq, Eq)] +#[derive(Clone, PartialEq, Eq)] #[lang="range_from"] #[stable(feature = "rust1", since = "1.0.0")] pub struct RangeFrom<Idx> { |
