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;
/// 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 {
#[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],
&[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