diff options
Diffstat (limited to 'src/libunicode')
| -rw-r--r-- | src/libunicode/lib.rs | 1 | ||||
| -rw-r--r-- | src/libunicode/tables.rs | 5 | ||||
| -rw-r--r-- | src/libunicode/u_str.rs | 4 |
3 files changed, 3 insertions, 7 deletions
diff --git a/src/libunicode/lib.rs b/src/libunicode/lib.rs index fbe912ced90..d812d249c5b 100644 --- a/src/libunicode/lib.rs +++ b/src/libunicode/lib.rs @@ -82,4 +82,5 @@ mod std { pub use core::clone; pub use core::cmp; pub use core::fmt; + pub use core::marker; } diff --git a/src/libunicode/tables.rs b/src/libunicode/tables.rs index 3f089d62e4e..a38f911688d 100644 --- a/src/libunicode/tables.rs +++ b/src/libunicode/tables.rs @@ -7801,13 +7801,12 @@ pub mod charwidth { } pub mod grapheme { - use core::marker::Copy; use core::slice::SliceExt; pub use self::GraphemeCat::*; use core::result::Result::{Ok, Err}; #[allow(non_camel_case_types)] - #[derive(Clone)] + #[derive(Clone, Copy)] pub enum GraphemeCat { GC_LV, GC_LVT, @@ -7821,8 +7820,6 @@ pub mod grapheme { GC_Any, } - impl Copy for GraphemeCat {} - fn bsearch_range_value_table(c: char, r: &'static [(char, char, GraphemeCat)]) -> GraphemeCat { use core::cmp::Ordering::{Equal, Less, Greater}; match r.binary_search_by(|&(lo, hi, _)| { diff --git a/src/libunicode/u_str.rs b/src/libunicode/u_str.rs index 66cdf03a51e..cf19e019f03 100644 --- a/src/libunicode/u_str.rs +++ b/src/libunicode/u_str.rs @@ -410,7 +410,7 @@ pub struct Utf16Items<'a> { iter: slice::Iter<'a, u16> } /// The possibilities for values decoded from a `u16` stream. -#[derive(PartialEq, Eq, Clone, Show)] +#[derive(Copy, PartialEq, Eq, Clone, Show)] pub enum Utf16Item { /// A valid codepoint. ScalarValue(char), @@ -418,8 +418,6 @@ pub enum Utf16Item { LoneSurrogate(u16) } -impl Copy for Utf16Item {} - impl Utf16Item { /// Convert `self` to a `char`, taking `LoneSurrogate`s to the /// replacement character (U+FFFD). |
