about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
diff options
context:
space:
mode:
authorSteve Klabnik <steve@steveklabnik.com>2015-09-03 20:10:07 -0400
committerSteve Klabnik <steve@steveklabnik.com>2015-09-03 20:10:07 -0400
commit055c23da7bd36b5aee4ffb2176dae9b2d9d7d109 (patch)
treefa40206f6389cd2024c73ee14838a90459aa47f3 /src/libsyntax/parse/parser.rs
parent1b908be9a0d7aaf8f18854db1ffef7b8df10dfeb (diff)
parent405c616eaf4e58a8bed67924c364c8e9c83b2581 (diff)
downloadrust-055c23da7bd36b5aee4ffb2176dae9b2d9d7d109.tar.gz
rust-055c23da7bd36b5aee4ffb2176dae9b2d9d7d109.zip
Rollup merge of #28167 - petrochenkov:bytelit, r=nikomatsakis
Avoid confusion with binary integer literals and binary operator expressions in libsyntax
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
-rw-r--r--src/libsyntax/parse/parser.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 0772d124db8..337e855f900 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -34,7 +34,7 @@ use ast::{ItemEnum, ItemFn, ItemForeignMod, ItemImpl, ItemConst};
 use ast::{ItemMac, ItemMod, ItemStruct, ItemTrait, ItemTy, ItemDefaultImpl};
 use ast::{ItemExternCrate, ItemUse};
 use ast::{LifetimeDef, Lit, Lit_};
-use ast::{LitBool, LitChar, LitByte, LitBinary};
+use ast::{LitBool, LitChar, LitByte, LitByteStr};
 use ast::{LitStr, LitInt, Local};
 use ast::{MacStmtWithBraces, MacStmtWithSemicolon, MacStmtWithoutBraces};
 use ast::{MutImmutable, MutMutable, Mac_, MacInvocTT, MatchSource};
@@ -1543,11 +1543,11 @@ impl<'a> Parser<'a> {
                             token::intern_and_get_ident(&parse::raw_str_lit(&s.as_str())),
                             ast::RawStr(n)))
                     }
-                    token::Binary(i) =>
-                        (true, LitBinary(parse::binary_lit(&i.as_str()))),
-                    token::BinaryRaw(i, _) =>
+                    token::ByteStr(i) =>
+                        (true, LitByteStr(parse::byte_str_lit(&i.as_str()))),
+                    token::ByteStrRaw(i, _) =>
                         (true,
-                         LitBinary(Rc::new(i.to_string().into_bytes()))),
+                         LitByteStr(Rc::new(i.to_string().into_bytes()))),
                 };
 
                 if suffix_illegal {
@@ -5826,7 +5826,7 @@ impl<'a> Parser<'a> {
         match try!(self.parse_optional_str()) {
             Some((s, style, suf)) => {
                 let sp = self.last_span;
-                self.expect_no_suffix(sp, "str literal", suf);
+                self.expect_no_suffix(sp, "string literal", suf);
                 Ok((s, style))
             }
             _ =>  Err(self.fatal("expected string literal"))