]> git.lizzy.rs Git - rust.git/commitdiff
Model lexer: Fix remaining issues
authorPiotr Czarnecki <pioczarn@gmail.com>
Tue, 21 Apr 2015 10:02:12 +0000 (12:02 +0200)
committerPiotr Czarnecki <pioczarn@gmail.com>
Tue, 21 Apr 2015 10:02:12 +0000 (12:02 +0200)
57 files changed:
src/grammar/README.md
src/grammar/RustLexer.g4
src/grammar/check.sh
src/grammar/verify.rs
src/libcollections/fmt.rs
src/libcollections/str.rs
src/libcollections/string.rs
src/libcore/hash/sip.rs
src/libcore/num/mod.rs
src/libcore/str/mod.rs
src/libcoretest/char.rs
src/libgetopts/lib.rs
src/librand/distributions/gamma.rs
src/librustc_unicode/u_str.rs
src/libserialize/hex.rs
src/libstd/ascii.rs
src/libstd/collections/hash/map.rs
src/libstd/collections/hash/set.rs
src/libstd/collections/hash/table.rs
src/libstd/io/buffered.rs
src/libstd/num/strconv.rs
src/libstd/rt/util.rs
src/libsyntax/codemap.rs
src/libsyntax/ext/tt/macro_parser.rs
src/test/bench/core-std.rs
src/test/bench/msgsend-ring-mutex-arcs.rs
src/test/bench/noise.rs
src/test/compile-fail/utf8_idents.rs
src/test/pretty/block-comment-wchar.pp
src/test/pretty/block-comment-wchar.rs
src/test/run-pass/byte-literals.rs
src/test/run-pass/default-method-supertrait-vtable.rs
src/test/run-pass/ifmt.rs
src/test/run-pass/issue-12582.rs
src/test/run-pass/issue-13027.rs
src/test/run-pass/issue-2718.rs
src/test/run-pass/issue-3683.rs
src/test/run-pass/issue-4759-1.rs
src/test/run-pass/issue-5280.rs
src/test/run-pass/issue-5321-immediates-with-bare-self.rs
src/test/run-pass/lexer-crlf-line-endings-string-literal-doc-comment.rs
src/test/run-pass/lint-non-camel-case-types-non-uppercase-statics-unicode.rs
src/test/run-pass/match-range.rs
src/test/run-pass/multibyte.rs
src/test/run-pass/raw-str.rs
src/test/run-pass/shebang.rs
src/test/run-pass/struct-return.rs
src/test/run-pass/trait-to-str.rs
src/test/run-pass/trait-with-bounds-default.rs
src/test/run-pass/traits-default-method-self.rs
src/test/run-pass/traits-default-method-trivial.rs
src/test/run-pass/unsized.rs
src/test/run-pass/unsized2.rs
src/test/run-pass/utf8-bom.rs
src/test/run-pass/utf8.rs
src/test/run-pass/utf8_chars.rs
src/test/run-pass/utf8_idents.rs

index 1f7923e1caff2b81fa9e0fb9af3be99bc52249a9..6e0cf17a88040beac190bd0e4293442d1b3f1623 100644 (file)
@@ -12,7 +12,7 @@ javac *.java
 rustc -O verify.rs
 for file in ../*/**.rs; do
     echo $file;
-    grun RustLexer tokens -tokens < $file | ./verify $file RustLexer.tokens || break
+    grun RustLexer tokens -tokens < "$file" | ./verify "$file" RustLexer.tokens || break
 done
 ```
 
index 8739d135b4f96fe9f89021206ad6f3575e1df4cb..3d8f3aeb28fa7cbcf60fc1b0f515f15b6b37d245 100644 (file)
@@ -1,5 +1,12 @@
 lexer grammar RustLexer;
 
+@lexer::members {
+  public boolean is_at(int pos) {
+    return _input.index() == pos;
+  }
+}
+
+
 tokens {
     EQ, LT, LE, EQEQ, NE, GE, GT, ANDAND, OROR, NOT, TILDE, PLUT,
     MINUS, STAR, SLASH, PERCENT, CARET, AND, OR, SHL, SHR, BINOP,
@@ -8,7 +15,7 @@ tokens {
     LBRACE, RBRACE, POUND, DOLLAR, UNDERSCORE, LIT_CHAR,
     LIT_INTEGER, LIT_FLOAT, LIT_STR, LIT_STR_RAW, LIT_BINARY,
     LIT_BINARY_RAW, IDENT, LIFETIME, WHITESPACE, DOC_COMMENT,
-    COMMENT
+    COMMENT, SHEBANG
 }
 
 import xidstart , xidcontinue;
@@ -86,85 +93,54 @@ fragment CHAR_ESCAPE
   | [xX] HEXIT HEXIT
   | 'u' HEXIT HEXIT HEXIT HEXIT
   | 'U' HEXIT HEXIT HEXIT HEXIT HEXIT HEXIT HEXIT HEXIT
+  | 'u{' HEXIT '}'
+  | 'u{' HEXIT HEXIT '}'
+  | 'u{' HEXIT HEXIT HEXIT '}'
+  | 'u{' HEXIT HEXIT HEXIT HEXIT '}'
+  | 'u{' HEXIT HEXIT HEXIT HEXIT HEXIT '}'
+  | 'u{' HEXIT HEXIT HEXIT HEXIT HEXIT HEXIT '}'
   ;
 
 fragment SUFFIX
   : IDENT
   ;
 
+fragment INTEGER_SUFFIX
+  : { _input.LA(1) != 'e' && _input.LA(1) != 'E' }? SUFFIX
+  ;
+
 LIT_CHAR
-  : '\'' ( '\\' CHAR_ESCAPE | ~[\\'\n\t\r] | '\ud800' .. '\udbff' '\udc00' .. '\udfff' ) '\'' SUFFIX?
+  : '\'' ( '\\' CHAR_ESCAPE
+         | ~[\\'\n\t\r]
+         | '\ud800' .. '\udbff' '\udc00' .. '\udfff'
+         )
+    '\'' SUFFIX?
   ;
 
 LIT_BYTE
-  : 'b\'' ( '\\' ( [xX] HEXIT HEXIT | [nrt\\'"0] ) | ~[\\'\n\t\r] ) '\'' SUFFIX?
+  : 'b\'' ( '\\' ( [xX] HEXIT HEXIT
+                 | [nrt\\'"0] )
+          | ~[\\'\n\t\r] '\udc00'..'\udfff'?
+          )
+    '\'' SUFFIX?
   ;
 
 LIT_INTEGER
-  : [0-9][0-9_]* SUFFIX?
-  | '0b' [01][01_]* SUFFIX?
-  | '0o' [0-7][0-7_]* SUFFIX?
-  | '0x' [0-9a-fA-F][0-9a-fA-F_]* SUFFIX?
+
+  : [0-9][0-9_]* INTEGER_SUFFIX?
+  | '0b' [01_]+ INTEGER_SUFFIX?
+  | '0o' [0-7_]+ INTEGER_SUFFIX?
+  | '0x' [0-9a-fA-F_]+ INTEGER_SUFFIX?
   ;
 
 LIT_FLOAT
   : [0-9][0-9_]* ('.' {
-        /* dot followed by another dot is a range, no float */
+        /* dot followed by another dot is a range, not a float */
         _input.LA(1) != '.' &&
-        /* dot followed by an identifier is an integer with a function call, no float */
+        /* dot followed by an identifier is an integer with a function call, not a float */
         _input.LA(1) != '_' &&
-        _input.LA(1) != 'a' &&
-        _input.LA(1) != 'b' &&
-        _input.LA(1) != 'c' &&
-        _input.LA(1) != 'd' &&
-        _input.LA(1) != 'e' &&
-        _input.LA(1) != 'f' &&
-        _input.LA(1) != 'g' &&
-        _input.LA(1) != 'h' &&
-        _input.LA(1) != 'i' &&
-        _input.LA(1) != 'j' &&
-        _input.LA(1) != 'k' &&
-        _input.LA(1) != 'l' &&
-        _input.LA(1) != 'm' &&
-        _input.LA(1) != 'n' &&
-        _input.LA(1) != 'o' &&
-        _input.LA(1) != 'p' &&
-        _input.LA(1) != 'q' &&
-        _input.LA(1) != 'r' &&
-        _input.LA(1) != 's' &&
-        _input.LA(1) != 't' &&
-        _input.LA(1) != 'u' &&
-        _input.LA(1) != 'v' &&
-        _input.LA(1) != 'w' &&
-        _input.LA(1) != 'x' &&
-        _input.LA(1) != 'y' &&
-        _input.LA(1) != 'z' &&
-        _input.LA(1) != 'A' &&
-        _input.LA(1) != 'B' &&
-        _input.LA(1) != 'C' &&
-        _input.LA(1) != 'D' &&
-        _input.LA(1) != 'E' &&
-        _input.LA(1) != 'F' &&
-        _input.LA(1) != 'G' &&
-        _input.LA(1) != 'H' &&
-        _input.LA(1) != 'I' &&
-        _input.LA(1) != 'J' &&
-        _input.LA(1) != 'K' &&
-        _input.LA(1) != 'L' &&
-        _input.LA(1) != 'M' &&
-        _input.LA(1) != 'N' &&
-        _input.LA(1) != 'O' &&
-        _input.LA(1) != 'P' &&
-        _input.LA(1) != 'Q' &&
-        _input.LA(1) != 'R' &&
-        _input.LA(1) != 'S' &&
-        _input.LA(1) != 'T' &&
-        _input.LA(1) != 'U' &&
-        _input.LA(1) != 'V' &&
-        _input.LA(1) != 'W' &&
-        _input.LA(1) != 'X' &&
-        _input.LA(1) != 'Y' &&
-        _input.LA(1) != 'Z'
+        !(_input.LA(1) >= 'a' && _input.LA(1) <= 'z') &&
+        !(_input.LA(1) >= 'A' && _input.LA(1) <= 'Z')
   }? | ('.' [0-9][0-9_]*)? ([eE] [-+]? [0-9][0-9_]*)? SUFFIX?)
   ;
 
@@ -172,8 +148,8 @@ LIT_STR
   : '"' ('\\\n' | '\\\r\n' | '\\' CHAR_ESCAPE | .)*? '"' SUFFIX?
   ;
 
-LIT_BINARY : 'b' LIT_STR SUFFIX?;
-LIT_BINARY_RAW : 'rb' LIT_STR_RAW SUFFIX?;
+LIT_BINARY : 'b' LIT_STR ;
+LIT_BINARY_RAW : 'b' LIT_STR_RAW ;
 
 /* this is a bit messy */
 
@@ -201,13 +177,19 @@ LIFETIME : '\'' IDENT ;
 
 WHITESPACE : [ \r\n\t]+ ;
 
-UNDOC_COMMENT     : '////' ~[\r\n]* -> type(COMMENT) ;
+UNDOC_COMMENT     : '////' ~[\n]* -> type(COMMENT) ;
 YESDOC_COMMENT    : '///' ~[\r\n]* -> type(DOC_COMMENT) ;
 OUTER_DOC_COMMENT : '//!' ~[\r\n]* -> type(DOC_COMMENT) ;
-LINE_COMMENT      : '//' ~[\r\n]* -> type(COMMENT) ;
+LINE_COMMENT      : '//' ( ~[/\n] ~[\n]* )? -> type(COMMENT) ;
 
 DOC_BLOCK_COMMENT
   : ('/**' ~[*] | '/*!') (DOC_BLOCK_COMMENT | .)*? '*/' -> type(DOC_COMMENT)
   ;
 
 BLOCK_COMMENT : '/*' (BLOCK_COMMENT | .)*? '*/' -> type(COMMENT) ;
+
+/* these appear at the beginning of a file */
+
+SHEBANG : '#!' { is_at(2) && _input.LA(1) != '[' }? ~[\r\n]* -> type(SHEBANG) ;
+
+UTF8_BOM : '\ufeff' { is_at(1) }? -> skip ;
index b0628303b6601e39e3092647649306783e7446f4..560b6b72471e186c8f31dd421b60b95d94fd76ef 100755 (executable)
@@ -18,13 +18,13 @@ failed=0
 skipped=0
 
 check() {
-    grep --silent "// ignore-lexer-test" $1;
+    grep --silent "// ignore-lexer-test" "$1";
 
     # if it's *not* found...
     if [ $? -eq 1 ]; then
         cd $2 # This `cd` is so java will pick up RustLexer.class. I couldn't
-        # figure out how to wrangle the CLASSPATH, just adding build/grammr didn't
-        # seem to have anny effect.
+        # figure out how to wrangle the CLASSPATH, just adding build/grammar
+        # didn't seem to have any effect.
         if $3 RustLexer tokens -tokens < $1 | $4 $1 $5; then
             echo "pass: $1"
             passed=`expr $passed + 1`
@@ -39,7 +39,7 @@ check() {
 }
 
 for file in $(find $1 -iname '*.rs' ! -path '*/test/compile-fail*'); do
-    check $file $2 $3 $4 $5
+    check "$file" $2 $3 $4 $5
 done
 
 printf "\ntest result: "
index 8bf501c7f3f80de4bf4cba726d55f52b4febbe1f..dec797747c270a67353294b1251ac5c45082b039 100644 (file)
@@ -8,9 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(plugin)]
-
-#![allow(unstable)]
+#![feature(plugin, rustc_private, str_char, collections)]
 
 extern crate syntax;
 extern crate rustc;
 extern crate log;
 
 use std::collections::HashMap;
-use std::io::File;
+use std::env;
+use std::fs::File;
+use std::io::{BufRead, Read};
+use std::path::Path;
 
 use syntax::parse;
 use syntax::parse::lexer;
@@ -27,6 +28,7 @@
 
 use syntax::ast;
 use syntax::ast::Name;
+use syntax::codemap;
 use syntax::codemap::Pos;
 use syntax::parse::token;
 use syntax::parse::lexer::TokenAndSpan;
@@ -108,6 +110,7 @@ fn id() -> token::Token {
             "LIT_BINARY"        => token::Literal(token::Binary(Name(0)), None),
             "LIT_BINARY_RAW"    => token::Literal(token::BinaryRaw(Name(0), 0), None),
             "QUESTION"          => token::Question,
+            "SHEBANG"           => token::Shebang(Name(0)),
             _                   => continue,
         };
 
@@ -166,24 +169,26 @@ fn count(lit: &str) -> usize {
     lit.chars().take_while(|c| *c == '#').count()
 }
 
-fn parse_antlr_token(s: &str, tokens: &HashMap<String, token::Token>, surrogate_pairs_pos: &[usize])
+fn parse_antlr_token(s: &str, tokens: &HashMap<String, token::Token>, surrogate_pairs_pos: &[usize],
+                     has_bom: bool)
                      -> TokenAndSpan {
     // old regex:
     // \[@(?P<seq>\d+),(?P<start>\d+):(?P<end>\d+)='(?P<content>.+?)',<(?P<toknum>-?\d+)>,\d+:\d+]
-    let start = s.find_str("[@").unwrap();
-    let comma = start + s[start..].find_str(",").unwrap();
-    let colon = comma + s[comma..].find_str(":").unwrap();
-    let content_start = colon + s[colon..].find_str("='").unwrap();
-    let content_end = content_start + s[content_start..].find_str("',<").unwrap();
-    let toknum_end = content_end + s[content_end..].find_str(">,").unwrap();
+    let start = s.find("[@").unwrap();
+    let comma = start + s[start..].find(",").unwrap();
+    let colon = comma + s[comma..].find(":").unwrap();
+    let content_start = colon + s[colon..].find("='").unwrap();
+    // Use rfind instead of find, because we don't want to stop at the content
+    let content_end = content_start + s[content_start..].rfind("',<").unwrap();
+    let toknum_end = content_end + s[content_end..].find(">,").unwrap();
 
     let start = &s[comma + 1 .. colon];
     let end = &s[colon + 1 .. content_start];
     let content = &s[content_start + 2 .. content_end];
     let toknum = &s[content_end + 3 .. toknum_end];
 
-    let proto_tok = tokens.get(toknum).expect(format!("didn't find token {:?} in the map",
-                                                              toknum));
+    let not_found = format!("didn't find token {:?} in the map", toknum);
+    let proto_tok = tokens.get(toknum).expect(&not_found[..]);
 
     let nm = parse::token::intern(content);
 
@@ -209,24 +214,25 @@ fn parse_antlr_token(s: &str, tokens: &HashMap<String, token::Token>, surrogate_
         ref t => t.clone()
     };
 
-    let offset = if real_tok == token::Eof
- {
+    let start_offset = if real_tok == token::Eof {
         1
     } else {
         0
     };
 
-    let mut lo = start.parse::<u32>().unwrap() - offset;
-    let mut hi = end.parse::<u32>().unwrap() + 1;
+    let offset = if has_bom { 1 } else { 0 };
+
+    let mut lo = start.parse::<u32>().unwrap() - start_offset - offset;
+    let mut hi = end.parse::<u32>().unwrap() + 1 - offset;
 
     // Adjust the span: For each surrogate pair already encountered, subtract one position.
     lo -= surrogate_pairs_pos.binary_search(&(lo as usize)).unwrap_or_else(|x| x) as u32;
     hi -= surrogate_pairs_pos.binary_search(&(hi as usize)).unwrap_or_else(|x| x) as u32;
 
-    let sp = syntax::codemap::Span {
-        lo: syntax::codemap::BytePos(lo),
-        hi: syntax::codemap::BytePos(hi),
-        expn_id: syntax::codemap::NO_EXPANSION
+    let sp = codemap::Span {
+        lo: codemap::BytePos(lo),
+        hi: codemap::BytePos(hi),
+        expn_id: codemap::NO_EXPANSION
     };
 
     TokenAndSpan {
@@ -245,10 +251,10 @@ fn tok_cmp(a: &token::Token, b: &token::Token) -> bool {
     }
 }
 
-fn span_cmp(antlr_sp: syntax::codemap::Span, rust_sp: syntax::codemap::Span, cm: &syntax::codemap::CodeMap) -> bool {
+fn span_cmp(antlr_sp: codemap::Span, rust_sp: codemap::Span, cm: &codemap::CodeMap) -> bool {
     antlr_sp.expn_id == rust_sp.expn_id &&
-        antlr_sp.lo.to_uint() == cm.bytepos_to_file_charpos(rust_sp.lo).to_uint() &&
-        antlr_sp.hi.to_uint() == cm.bytepos_to_file_charpos(rust_sp.hi).to_uint()
+        antlr_sp.lo.to_usize() == cm.bytepos_to_file_charpos(rust_sp.lo).to_usize() &&
+        antlr_sp.hi.to_usize() == cm.bytepos_to_file_charpos(rust_sp.hi).to_usize()
 }
 
 fn main() {
@@ -257,10 +263,15 @@ fn next(r: &mut lexer::StringReader) -> TokenAndSpan {
         r.next_token()
     }
 
-    let args = std::os::args();
+    let mut args = env::args().skip(1);
+    let filename = args.next().unwrap();
+    if filename.find("parse-fail").is_some() {
+        return;
+    }
 
     // Rust's lexer
-    let code = File::open(&Path::new(args[1])).unwrap().read_to_string().unwrap();
+    let mut code = String::new();
+    File::open(&Path::new(&filename)).unwrap().read_to_string(&mut code).unwrap();
 
     let surrogate_pairs_pos: Vec<usize> = code.chars().enumerate()
                                                      .filter(|&(_, c)| c as usize > 0xFFFF)
@@ -269,6 +280,8 @@ fn next(r: &mut lexer::StringReader) -> TokenAndSpan {
                                                      .map(|(x, n)| x + n)
                                                      .collect();
 
+    let has_bom = code.starts_with("\u{feff}");
+
     debug!("Pairs: {:?}", surrogate_pairs_pos);
 
     let options = config::basic_options();
@@ -281,15 +294,18 @@ fn next(r: &mut lexer::StringReader) -> TokenAndSpan {
     let ref cm = lexer.span_diagnostic.cm;
 
     // ANTLR
-    let mut token_file = File::open(&Path::new(args[2]));
-    let token_map = parse_token_list(token_file.read_to_string().unwrap());
+    let mut token_file = File::open(&Path::new(&args.next().unwrap())).unwrap();
+    let mut token_list = String::new();
+    token_file.read_to_string(&mut token_list).unwrap();
+    let token_map = parse_token_list(&token_list[..]);
 
-    let mut stdin = std::io::stdin();
-    let mut lock = stdin.lock();
+    let stdin = std::io::stdin();
+    let lock = stdin.lock();
     let lines = lock.lines();
-    let mut antlr_tokens = lines.map(|l| parse_antlr_token(l.unwrap().trim(),
-                                                           &token_map,
-                                                           &surrogate_pairs_pos[]));
+    let antlr_tokens = lines.map(|l| parse_antlr_token(l.unwrap().trim(),
+                                                       &token_map,
+                                                       &surrogate_pairs_pos[..],
+                                                       has_bom));
 
     for antlr_tok in antlr_tokens {
         let rustc_tok = next(&mut lexer);
@@ -314,7 +330,7 @@ macro_rules! matches {
                         }
                         _ => panic!("{:?} is not {:?}", antlr_tok, rustc_tok)
                     },)*
-                    ref c => assert!(c == &antlr_tok.tok, "{:?} is not {:?}", rustc_tok, antlr_tok)
+                    ref c => assert!(c == &antlr_tok.tok, "{:?} is not {:?}", antlr_tok, rustc_tok)
                 }
             )
         }
index 5f0d9012d1a7d5b6df3fd0a252b9576b978efc59..40b64b5c3b42464b4f0c0f071d2f74f30e76cc4e 100644 (file)
@@ -7,8 +7,6 @@
 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
-//
-// ignore-lexer-test FIXME #15679
 
 //! Utilities for formatting and printing strings
 //!
index 0f902e258b9ca27bd46827f2a6d649604bca4847..266cda9a2379dae9f07162624f08bdff00d8c73d 100644 (file)
@@ -7,8 +7,6 @@
 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
-//
-// ignore-lexer-test FIXME #15679
 
 //! Unicode string manipulation (the `str` type).
 //!
index 74af5783fa8052799b6a029149f6552074a89240..3422bfe5423561c1d52ddc7c3b0e0c147ff06c02 100644 (file)
@@ -7,8 +7,6 @@
 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
-//
-// ignore-lexer-test FIXME #15679
 
 //! An owned, growable string that enforces that its contents are valid UTF-8.
 
index 6820a7025fca6f171cda155752bf60d6e258bf2d..65f790d5d432ea7a3d6efd5aa9adaa57aee1eb48 100644 (file)
@@ -7,8 +7,6 @@
 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
-//
-// ignore-lexer-test FIXME #15883
 
 //! An implementation of SipHash 2-4.
 
index a056e585fee65644beeba413ba9a5accaebb9023..bcfdcfcd5e62db954c63609b0d3a8884774941aa 100644 (file)
@@ -7,8 +7,6 @@
 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
-//
-// ignore-lexer-test FIXME #15679
 
 //! Numeric traits and functions for the built-in numeric types.
 
index 2d6ef39361e8ad5011f67525f0ae4f5bb20ff40b..34810b4864e03eeeab666545f04831f7b641595f 100644 (file)
@@ -7,8 +7,6 @@
 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
-//
-// ignore-lexer-test FIXME #15679
 
 //! String manipulation
 //!
index 4939277aa59bcbe017ded0508c1b08e8fd73dfea..b73807aa317588a7500309bc87b2d8912990875a 100644 (file)
@@ -7,8 +7,6 @@
 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
-//
-// ignore-lexer-test FIXME #15679
 
 #[test]
 fn test_is_lowercase() {
index 02c4a2339966f9352379519bc5f91898cbf8ee20..197199e743f5767603a7f73fe876937964e004d1 100644 (file)
@@ -7,8 +7,6 @@
 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
-//
-// ignore-lexer-test FIXME #15677
 
 //! Simple getopt alternative.
 //!
index 1125d09653631cd84bdaa134c9ede52289908e7b..f37093c6db85bf20a19ad67f428284177f7b575d 100644 (file)
@@ -7,8 +7,6 @@
 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
-//
-// ignore-lexer-test FIXME #15679
 
 //! The Gamma and derived distributions.
 
index 09a5feb5fef30b05fba146e20311abe754299322..c63c586b6a90100ab1a8801cb3b7cce6210e8961 100644 (file)
@@ -7,8 +7,6 @@
 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
-//
-// ignore-lexer-test FIXME #15679
 
 //! Unicode-intensive string manipulations.
 //!
index 0676edf81696f5647048681cccddb38ad175c81c..87f1dca2caed0dc2213431326320011cde866981 100644 (file)
@@ -7,8 +7,6 @@
 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
-//
-// ignore-lexer-test FIXME #15679
 
 //! Hex binary-to-text encoding
 
index a2ba8c4c1bae07dfb9d494e3eb3c60a54f366b84..ccc56960b02ce111877e9fe6c689988770ef548b 100644 (file)
@@ -7,8 +7,6 @@
 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
-//
-// ignore-lexer-test FIXME #15679
 
 //! Operations on ASCII strings and characters
 
index 4ac15b7991b32c188f10211bfbee284dd6157b0e..a5bbbee790a217e6aa976ab87d1369895c7763b9 100644 (file)
@@ -7,8 +7,6 @@
 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
-//
-// ignore-lexer-test FIXME #15883
 
 use self::Entry::*;
 use self::SearchResult::*;
index 62c03389b24ae8e28c3c81097f899d07dfd44aa4..82109900bf2aff93557742a931c610b2667108eb 100644 (file)
@@ -7,8 +7,6 @@
 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
-//
-// ignore-lexer-test FIXME #15883
 
 use borrow::Borrow;
 use clone::Clone;
index dec6d1e2209ad9b982f695ce6f06b2efb50ecd32..65ebf8515e696bee56fafa19a4c9d942e10938c9 100644 (file)
@@ -7,8 +7,6 @@
 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
-//
-// ignore-lexer-test FIXME #15883
 
 use self::BucketState::*;
 
index bd44a9547b49677591d7b4c75f7eda101649f042..67cac42c35ec2d0a5ee22cad0fbdae38b1366442 100644 (file)
@@ -7,8 +7,6 @@
 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
-//
-// ignore-lexer-test FIXME #15883
 
 //! Buffering wrappers for I/O traits
 
index 8ab66f2328fb6f837d2e2361fda5fb5487d5edbe..ce1da4742d1dffe0c5c042d6dc627f7bb8713f16 100644 (file)
@@ -7,8 +7,6 @@
 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
-//
-// ignore-lexer-test FIXME #15679
 
 #![allow(missing_docs)]
 #![allow(deprecated)]
index 9919238c208dab8063e05adf4cab6875457f011b..31e970a9550c4316a74a3fc3f1a3aad25d0eb3e1 100644 (file)
@@ -7,8 +7,6 @@
 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
-//
-// ignore-lexer-test FIXME #15677
 
 use io::prelude::*;
 
index a0bde8f6c525e9dfadedaff51974a3ebd2f6091c..dfdaa47d8b925a66af0a8b3c7227d9b5242800e2 100644 (file)
@@ -7,8 +7,6 @@
 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
-//
-// ignore-lexer-test FIXME #15679
 
 //! The CodeMap tracks all the source code used within a single crate, mapping
 //! from integer byte positions to the original source code location. Each bit
index 9c3a556b210f9edb84f0910a90413bd697bca545..58df4038403a69b9a118176a535ea6a4ef09c5f6 100644 (file)
@@ -7,8 +7,6 @@
 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
-//
-// ignore-lexer-test FIXME #15679
 
 //! This is an Earley-like parser, without support for in-grammar nonterminals,
 //! only by calling out to the main rust parser for named nonterminals (which it
index 46caed6f9f5f59c482bf879de7af0abdf2427c47..19f83c7817c7c384d2c3853ddfdcda82d6188d19 100644 (file)
@@ -8,7 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// ignore-lexer-test FIXME #15679
 // Microbenchmarks for various functions in std and extra
 
 #![feature(rand, collections, std_misc)]
index c87cdb617a477732e093a26d53fefa3b622d6245..8048f3dde96826bc36b9fe17b1a24b5e551336e2 100644 (file)
@@ -16,7 +16,6 @@
 // This also serves as a pipes test, because Arcs are implemented with pipes.
 
 // no-pretty-expanded FIXME #15189
-// ignore-lexer-test FIXME #15679
 
 #![feature(std_misc)]
 
index c21470d4bb3e7f48e82ccf4f5b2c998382730d44..530c499f5fdbda7f8e4ccd9e921f2a6de0ffedbc 100644 (file)
@@ -10,7 +10,6 @@
 
 // Multi-language Perlin noise benchmark.
 // See https://github.com/nsf/pnoise for timings and alternative implementations.
-// ignore-lexer-test FIXME #15679
 
 #![feature(rand, core)]
 
index a5471e87f220403b242351530204b04e9557e7f9..8594c35f8dd1b1fbdb569c7e5f26ab8d174dd527 100644 (file)
@@ -8,7 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 //
-// ignore-lexer-test FIXME #15679
 
 fn foo<
     'β, //~ ERROR non-ascii idents are not fully supported
index a5d82277d2f94aaa66de840350b9d03503b57efd..2dc7e8f952549dad342370cc4bc12997134000ea 100644 (file)
@@ -14,7 +14,6 @@
 // ignore-tidy-cr
 // ignore-tidy-tab
 // pp-exact:block-comment-wchar.pp
-// ignore-lexer-test FIXME #15679
 fn f() {
     fn nested() {
         /*
index eb6d2a4a0a17392851e3808808b65721053ac897..6f4a95e7c9b00443d6ae5148312cff9782e537a6 100644 (file)
@@ -14,7 +14,6 @@
 // ignore-tidy-cr
 // ignore-tidy-tab
 // pp-exact:block-comment-wchar.pp
-// ignore-lexer-test FIXME #15679
 fn f() {
     fn nested() {
         /*
index fbe2a65bc893719e4fec693f056314704ed1aec4..9f7b98a57fcec74d44ce0ad11879c3d6851af041 100644 (file)
@@ -8,7 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 //
-// ignore-lexer-test FIXME #15883
 
 
 static FOO: u8 = b'\xF0';
index 3b1e04be78d48d220bb8186715e49b19f65f1b1d..0d45a5d52124d08694b21de408fff8083040b3e3 100644 (file)
@@ -8,7 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 //
-// ignore-lexer-test FIXME #15877
 
 
 // Tests that we can call a function bounded over a supertrait from
index ea9db9b1e1f8d91aabb86d5628b4c727f9af657f..7ae1347f2c7cd4d7e48d26800f7540d9d4ae27e0 100644 (file)
@@ -9,7 +9,6 @@
 // except according to those terms.
 
 // no-pretty-expanded unnecessary unsafe block generated
-// ignore-lexer-test FIXME #15679
 
 #![deny(warnings)]
 #![allow(unused_must_use)]
index 4009d17139ddacd128cc772c46b01a4dfe8b33e5..7bab2ddfed06bbc429c95063ed1ab68cb2d9eb8b 100644 (file)
@@ -8,7 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 //
-// ignore-lexer-test FIXME #15877
 
 pub fn main() {
     let x = 1;
index dadd480dc6a2cd644106fd5443aa9f5f3d63e24e..14987484711792ea44275d6236af8894a8a334a2 100644 (file)
@@ -8,7 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 //
-// ignore-lexer-test FIXME #15877
 
 // Tests that match expression handles overlapped literal and range
 // properly in the presence of guard function.
index 71d1439dd2bc8f3f14d197137c50853a27e506fe..0df89c72424b46ee484e3e0fb04772865fa12547 100644 (file)
@@ -8,7 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 //
-// ignore-lexer-test FIXME #15883
 
 #![feature(unsafe_destructor, std_misc)]
 
index 096eec803ffa1716aa51facbbb46d11ff6a82904..ed9b8066104f565ee7b9351520d0cebc0602bd80 100644 (file)
@@ -8,7 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 //
-// ignore-lexer-test FIXME #15877
 
 
 trait Foo {
index 3532a395b7a2d8aebc0a2f623f7b751b9320bcd0..a565460c42e28333fad057b931ed6d27ecc14fc0 100644 (file)
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// pretty-expanded FIXME #23616
-
 trait U { fn f(self); }
 impl U for isize { fn f(self) {} }
 pub fn main() { 4.f(); }
index bd892465054693419c406a0e2d936d12d7a108b8..5e2e4df95b3261b0970eca1acb83baaac18bb876 100644 (file)
@@ -8,7 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 //
-// ignore-lexer-test FIXME #15877
 
 type FontTableTag = u32;
 
index d0bc396c368bdf4b1f8aa49896bd93490ef72e84..dd00fab50203b8e94c8483d1cc3e194f1577d1e0 100644 (file)
@@ -8,7 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 //
-// ignore-lexer-test FIXME #15877
 
 trait Fooable {
     fn yes(self);
index 421ae8e94972e8c68d6a2c9643af31a694cb6d6f..5c8db524cc2edeec729b4efb9949333bace83422 100644 (file)
@@ -16,7 +16,6 @@
 // this directory should enforce it.\r
 \r
 // ignore-pretty\r
-// ignore-lexer-test FIXME #15882\r
 \r
 /// Doc comment that ends in CRLF\r
 pub fn foo() {}\r
index 6ddaee9c8bd5c1a669f1889bd8955e4cbaf00b2f..6e65cb2afd4ff38c59063c1235c9276a4589690e 100644 (file)
@@ -8,7 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 //
-// ignore-lexer-test FIXME #15679
 
 
 #![forbid(non_camel_case_types)]
index 68719090cff521ae9ffb107efe9ad7fbd858314c..0b2e19d6c7930e0186119eae50540d328a26ae72 100644 (file)
@@ -8,7 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 //
-// ignore-lexer-test FIXME #15877
 
 pub fn main() {
     match 5_usize {
index 77084836408aa199af670910c757d767d9d6156e..0475dd10fdef9ff6b8d8f6b75e265d795afebdf3 100644 (file)
@@ -8,7 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 //
-// ignore-lexer-test FIXME #15679
 
 // Test that multibyte characters don't crash the compiler
 pub fn main() {
index 298ac8f77eb11dd6f5a4a63ea68920e34a5e7d61..9ee824d4185851b4477dadb969fae7a857ff2bb8 100644 (file)
Binary files a/src/test/run-pass/raw-str.rs and b/src/test/run-pass/raw-str.rs differ
index 87da814771b4597109b7b6d4bc337955d9a5bdbb..15ab21bbc8da7bcdbdbd14d70de513214f469294 100644 (file)
@@ -11,6 +11,5 @@
 
 // ignore-pretty: `expand` adds some preludes before shebang
 //
-// ignore-lexer-test FIXME #15878
 
 pub fn main() { println!("Hello World"); }
index 1ff13d4eaeacb1c2129beb4835fb40ed722f0dbe..109287a83b16a88e93ced69fd83047aac5ad4188 100644 (file)
@@ -8,7 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 //
-// ignore-lexer-test FIXME #15883
 
 #[derive(Copy, Clone)]
 pub struct Quad { a: u64, b: u64, c: u64, d: u64 }
index 3d84092c062e6b5117169b7a69b048f5fa54ae84..a29e0e932c07d329fe6969b303a0e37c389db35e 100644 (file)
@@ -8,7 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 //
-// ignore-lexer-test FIXME #15883
 
 
 trait to_str {
index 34a79c4cf31a05c547384312b15d8674bd75db25..cfd812400947e5e637b4986731c020aa81a64665 100644 (file)
@@ -8,7 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 //
-// ignore-lexer-test FIXME #15877
 
 pub trait Clone2 {
     /// Returns a copy of the value. The contents of owned pointers
index d9536108f4df3d77db84dc3178cf0c1fa5e7390e..36b0eb527b64251f5b8fb82bd6f95580691e3f9e 100644 (file)
@@ -8,7 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 //
-// ignore-lexer-test FIXME #15877
 
 
 trait Cat {
index 0e71fcab9d1476e461c21c0746994abe6cb5d3b2..a2e7f54bba65203bcbc97ce9be1498f67a4862df 100644 (file)
@@ -8,7 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 //
-// ignore-lexer-test FIXME #15877
 
 
 trait Cat {
index 449d6b37e9f894183d336845f66993600876a5c1..26f7b767988d240581d7bcb39cf838c352b06de7 100644 (file)
@@ -10,8 +10,6 @@
 
 // Test syntax checks for `?Sized` syntax.
 
-// pretty-expanded FIXME #23616
-
 use std::marker::PhantomData;
 
 trait T1  { }
index 965ce6bad1668bf006e17383eef554ae43ceff86..1cce98ae6b7258ed3efa814a353b6ff53125dd35 100644 (file)
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// pretty-expanded FIXME #23616
-
 #![allow(unknown_features)]
 #![feature(box_syntax)]
 
index baa4e941ff097432389c287c30131ffee1533f2a..c3052a928d6d6764348cf56beb3d2d5f15b41a8f 100644 (file)
@@ -8,7 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 //
-// ignore-lexer-test FIXME #15679
 
 // This file has utf-8 BOM, it should be compiled normally without error.
 
index 07fd7b297b4247e29c0a82c36b2a36094df3b9a8..4782edf4e129aba11f829344b153207a8346a947 100644 (file)
@@ -8,7 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 //
-// ignore-lexer-test FIXME #15679
 // no-pretty-expanded FIXME #15189
 
 pub fn main() {
index 45a3f2327aaa6b559f4e2c71c438658497028c1a..36b64551ef28f679f1144c3bfd52d7dc54c52f8d 100644 (file)
@@ -8,7 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 //
-// ignore-lexer-test FIXME #15679
 
 #![feature(collections, core, str_char)]
 
index b11b7e83eb6713e979e948c88febf567fc41c765..559afcd164148998bbdbd1f4ef955ef9d474c834 100644 (file)
@@ -8,7 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 //
-// ignore-lexer-test FIXME #15679
 
 #![feature(non_ascii_idents)]