diff options
| author | bors <bors@rust-lang.org> | 2015-01-30 12:43:41 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-01-30 12:43:41 +0000 |
| commit | 1a51eb9cca3ae5f815825096de4dfbdc9267f735 (patch) | |
| tree | 63ba0c9e1427a631fff6226b85c1d1df56178b41 /src/libstd/sys | |
| parent | e0f5980ead4f88e78a47f4d84da4dc11472f66ba (diff) | |
| parent | 023d49e347e9d155a8a713d40f63329902ad249d (diff) | |
Auto merge of #21717 - nick29581:prelude-fullrange, r=acrichto
r? @alexcrichton
Diffstat (limited to 'src/libstd/sys')
| -rw-r--r-- | src/libstd/sys/common/wtf8.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/libstd/sys/common/wtf8.rs b/src/libstd/sys/common/wtf8.rs index bc072155063..fdcb0c19f30 100644 --- a/src/libstd/sys/common/wtf8.rs +++ b/src/libstd/sys/common/wtf8.rs @@ -680,6 +680,7 @@ impl ops::Index<ops::RangeTo<usize>> for Wtf8 { } } +#[cfg(stage0)] impl ops::Index<ops::FullRange> for Wtf8 { type Output = Wtf8; @@ -689,6 +690,16 @@ impl ops::Index<ops::FullRange> for Wtf8 { } } +#[cfg(not(stage0))] +impl ops::Index<ops::RangeFull> for Wtf8 { + type Output = Wtf8; + + #[inline] + fn index(&self, _range: &ops::RangeFull) -> &Wtf8 { + self + } +} + #[inline] fn decode_surrogate(second_byte: u8, third_byte: u8) -> u16 { // The first byte is assumed to be 0xED |
