diff options
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/ast.rs | 1 | ||||
| -rw-r--r-- | src/libsyntax/codemap.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/lib.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/parse/lexer/mod.rs | 12 | ||||
| -rw-r--r-- | src/libsyntax/parse/token.rs | 2 |
5 files changed, 6 insertions, 13 deletions
diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs index 0a04a953b31..11af1a43277 100644 --- a/src/libsyntax/ast.rs +++ b/src/libsyntax/ast.rs @@ -562,7 +562,6 @@ pub enum BinOp { BiGt, } -#[cfg(not(stage0))] impl Copy for BinOp {} #[deriving(Clone, PartialEq, Eq, Encodable, Decodable, Hash, Show)] diff --git a/src/libsyntax/codemap.rs b/src/libsyntax/codemap.rs index 50b4f342368..7f2becf8201 100644 --- a/src/libsyntax/codemap.rs +++ b/src/libsyntax/codemap.rs @@ -350,7 +350,7 @@ impl CodeMap { // Remove utf-8 BOM if any. // FIXME #12884: no efficient/safe way to remove from the start of a string // and reuse the allocation. - let mut src = if src.starts_with("\ufeff") { + let mut src = if src.starts_with("\u{feff}") { String::from_str(src.slice_from(3)) } else { String::from_str(src.as_slice()) diff --git a/src/libsyntax/lib.rs b/src/libsyntax/lib.rs index f3686864518..ea305642f66 100644 --- a/src/libsyntax/lib.rs +++ b/src/libsyntax/lib.rs @@ -23,7 +23,7 @@ html_root_url = "http://doc.rust-lang.org/nightly/")] #![allow(unknown_features)] -#![feature(if_let, macro_rules, globs, default_type_params, phase, slicing_syntax)] +#![feature(macro_rules, globs, default_type_params, phase, slicing_syntax)] #![feature(quote, unsafe_destructor, import_shadowing)] extern crate arena; diff --git a/src/libsyntax/parse/lexer/mod.rs b/src/libsyntax/parse/lexer/mod.rs index 2a77e3e6791..4c15fae9feb 100644 --- a/src/libsyntax/parse/lexer/mod.rs +++ b/src/libsyntax/parse/lexer/mod.rs @@ -763,8 +763,6 @@ impl<'a> StringReader<'a> { } } - // SNAP c9f6d69 - #[allow(unused)] fn old_escape_warning(&mut self, sp: Span) { self.span_diagnostic .span_warn(sp, "\\U00ABCD12 and \\uABCD escapes are deprecated"); @@ -796,17 +794,15 @@ impl<'a> StringReader<'a> { self.scan_unicode_escape(delim) } else { let res = self.scan_hex_digits(4u, delim, false); - // SNAP c9f6d69 - //let sp = codemap::mk_sp(escaped_pos, self.last_pos); - //self.old_escape_warning(sp); + let sp = codemap::mk_sp(escaped_pos, self.last_pos); + self.old_escape_warning(sp); res } } 'U' if !ascii_only => { let res = self.scan_hex_digits(8u, delim, false); - // SNAP c9f6d69 - //let sp = codemap::mk_sp(escaped_pos, self.last_pos); - //self.old_escape_warning(sp); + let sp = codemap::mk_sp(escaped_pos, self.last_pos); + self.old_escape_warning(sp); res } '\n' if delim == '"' => { diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs index 4b1e9482a7d..1bdcd73d847 100644 --- a/src/libsyntax/parse/token.rs +++ b/src/libsyntax/parse/token.rs @@ -89,10 +89,8 @@ impl Lit { } } -#[cfg(not(stage0))] impl Copy for Lit {} -#[cfg(not(stage0))] impl Copy for IdentStyle {} #[allow(non_camel_case_types)] |
