]> git.lizzy.rs Git - rust.git/blobdiff - src/libcollections/str.rs
rollup merge of #20482: kmcallister/macro-reform
[rust.git] / src / libcollections / str.rs
index 4a5dcb51322d4c485ebc372ee11c1d7a9b62b86c..c0482702ccdb66c1a6ee149ebaa0811d7a66808b 100644 (file)
@@ -60,7 +60,6 @@
 use core::clone::Clone;
 use core::iter::AdditiveIterator;
 use core::iter::{range, Iterator, IteratorExt};
-use core::kinds::Sized;
 use core::ops;
 use core::option::Option::{self, Some, None};
 use core::slice::AsSlice;
@@ -409,7 +408,7 @@ fn to_owned(&self) -> String {
 
 /// Any string that can be represented as a slice.
 #[stable]
-pub trait StrExt for Sized?: ops::Slice<uint, str> {
+pub trait StrExt: ops::Slice<uint, str> {
     /// Escapes each char in `s` with `char::escape_default`.
     #[unstable = "return type may change to be an iterator"]
     fn escape_default(&self) -> String {
@@ -1847,7 +1846,9 @@ fn test_is_utf8() {
     #[test]
     fn test_is_utf16() {
         use unicode::str::is_utf16;
-        macro_rules! pos ( ($($e:expr),*) => { { $(assert!(is_utf16($e));)* } });
+        macro_rules! pos {
+            ($($e:expr),*) => { { $(assert!(is_utf16($e));)* } }
+        }
 
         // non-surrogates
         pos!(&[0x0000],
@@ -1867,7 +1868,9 @@ fn test_is_utf16() {
              &[0x0067, 0xd8ff, 0xddb7, 0x000f, 0xd900, 0xdc80]);
 
         // negative tests
-        macro_rules! neg ( ($($e:expr),*) => { { $(assert!(!is_utf16($e));)* } });
+        macro_rules! neg {
+            ($($e:expr),*) => { { $(assert!(!is_utf16($e));)* } }
+        }
 
         neg!(
             // surrogate + regular unit