diff options
| author | Oliver 'ker' Schneider <git-spam-no-reply9815368754983@oli-obk.de> | 2016-02-09 18:01:08 +0100 |
|---|---|---|
| committer | Oliver Schneider <git-spam-no-reply9815368754983@oli-obk.de> | 2016-02-11 12:34:48 +0100 |
| commit | 8b3856b1bc1c23969e5d8983f25cf85698a5c2b1 (patch) | |
| tree | 6fc585af50a42be52b5a268f6ce74d36dacb1651 /src/libsyntax/parse | |
| parent | d844bfb1967b780ff6cc6e81644bf4b529dc0738 (diff) | |
| download | rust-8b3856b1bc1c23969e5d8983f25cf85698a5c2b1.tar.gz rust-8b3856b1bc1c23969e5d8983f25cf85698a5c2b1.zip | |
[breaking-change] don't glob export ast::StrStyle variants
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index a13c79bdda1..afab3a0711b 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -1544,13 +1544,13 @@ impl<'a> Parser<'a> { token::Str_(s) => { (true, LitKind::Str(token::intern_and_get_ident(&parse::str_lit(&s.as_str())), - ast::CookedStr)) + ast::StrStyle::Cooked)) } token::StrRaw(s, n) => { (true, LitKind::Str( token::intern_and_get_ident(&parse::raw_str_lit(&s.as_str())), - ast::RawStr(n))) + ast::StrStyle::Raw(n))) } token::ByteStr(i) => (true, LitKind::ByteStr(parse::byte_str_lit(&i.as_str()))), @@ -5966,10 +5966,12 @@ impl<'a> Parser<'a> { Option<ast::Name>)> { let ret = match self.token { token::Literal(token::Str_(s), suf) => { - (self.id_to_interned_str(ast::Ident::with_empty_ctxt(s)), ast::CookedStr, suf) + let s = self.id_to_interned_str(ast::Ident::with_empty_ctxt(s)); + (s, ast::StrStyle::Cooked, suf) } token::Literal(token::StrRaw(s, n), suf) => { - (self.id_to_interned_str(ast::Ident::with_empty_ctxt(s)), ast::RawStr(n), suf) + let s = self.id_to_interned_str(ast::Ident::with_empty_ctxt(s)); + (s, ast::StrStyle::Raw(n), suf) } _ => return None }; |
