diff options
| author | Brian Anderson <banderson@mozilla.com> | 2011-09-01 16:47:46 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2011-09-01 16:53:53 -0700 |
| commit | e35c021aa44d9e86569592657f85943bae1815a5 (patch) | |
| tree | 02ba7cc6cbc600503bf87519725bf8f516970680 /src/comp/syntax/parse | |
| parent | d8a833dccd5dc6e7c2b0694e22334724fe32e91d (diff) | |
| download | rust-e35c021aa44d9e86569592657f85943bae1815a5.tar.gz rust-e35c021aa44d9e86569592657f85943bae1815a5.zip | |
Parse "",str as istrs. Pretty print istrs as "",str. Issue #855
Diffstat (limited to 'src/comp/syntax/parse')
| -rw-r--r-- | src/comp/syntax/parse/parser.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/comp/syntax/parse/parser.rs b/src/comp/syntax/parse/parser.rs index cf3c02cb03a..e22ebeb78d3 100644 --- a/src/comp/syntax/parse/parser.rs +++ b/src/comp/syntax/parse/parser.rs @@ -493,7 +493,7 @@ fn parse_ty(p: &parser, colons_before_params: bool) -> @ast::ty { } else if eat_word(p, ~"float") { t = ast::ty_float; } else if eat_word(p, ~"str") { - t = ast::ty_str; + t = ast::ty_istr; } else if eat_word(p, ~"istr") { t = ast::ty_istr; } else if eat_word(p, ~"char") { @@ -708,7 +708,7 @@ fn parse_lit(p: &parser) -> ast::lit { token::LIT_CHAR(c) { p.bump(); lit = ast::lit_char(c); } token::LIT_STR(s) { p.bump(); - lit = ast::lit_str(p.get_str(s), ast::sk_rc); + lit = ast::lit_str(p.get_str(s), ast::sk_unique); } token::LPAREN. { p.bump(); |
