@@ -16,7 +16,7 @@ use ext::tt::transcribe::tt_next_token;
1616use parse:: token;
1717use parse:: token:: str_to_ident;
1818
19- use std:: borrow:: { IntoCow , Cow } ;
19+ use std:: borrow:: Cow ;
2020use std:: char;
2121use std:: fmt;
2222use std:: mem:: replace;
@@ -293,15 +293,15 @@ impl<'a> StringReader<'a> {
293293 let next = i + ch. len_utf8 ( ) ;
294294 if ch == '\r' {
295295 if next < s. len ( ) && s. char_at ( next) == '\n' {
296- return translate_crlf_ ( self , start, s, errmsg, i) . into_cow ( ) ;
296+ return translate_crlf_ ( self , start, s, errmsg, i) . into ( ) ;
297297 }
298298 let pos = start + BytePos ( i as u32 ) ;
299299 let end_pos = start + BytePos ( next as u32 ) ;
300300 self . err_span_ ( pos, end_pos, errmsg) ;
301301 }
302302 i = next;
303303 }
304- return s. into_cow ( ) ;
304+ return s. into ( ) ;
305305
306306 fn translate_crlf_ ( rdr : & StringReader , start : BytePos ,
307307 s : & str , errmsg : & str , mut i : usize ) -> String {
@@ -564,7 +564,7 @@ impl<'a> StringReader<'a> {
564564 let string = if has_cr {
565565 self . translate_crlf ( start_bpos, string,
566566 "bare CR not allowed in block doc-comment" )
567- } else { string. into_cow ( ) } ;
567+ } else { string. into ( ) } ;
568568 token:: DocComment ( token:: intern ( & string[ ..] ) )
569569 } else {
570570 token:: Comment
0 commit comments