diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2013-06-11 19:13:42 -0700 |
|---|---|---|
| committer | Corey Richardson <corey@octayn.net> | 2013-06-28 10:44:16 -0400 |
| commit | a1531ed946e2d650fc6cb5af6258fed8003e9443 (patch) | |
| tree | 8f629d34e6cb62bd9a5a2ef22656075715446c0e /src/libsyntax/parse/parser.rs | |
| parent | 3fcd4dca301d01c41a7db7f9023bc11be1025fc7 (diff) | |
| download | rust-a1531ed946e2d650fc6cb5af6258fed8003e9443.tar.gz rust-a1531ed946e2d650fc6cb5af6258fed8003e9443.zip | |
librustc: Remove the broken overloaded assign-ops from the language.
They evaluated the receiver twice. They should be added back with `AddAssign`, `SubAssign`, etc., traits.
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index ee5ef8dfa6b..a7c46d609ca 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -4257,8 +4257,12 @@ impl Parser { // FAILURE TO PARSE ITEM if visibility != inherited { let mut s = ~"unmatched visibility `"; - s += if visibility == public { "pub" } else { "priv" }; - s += "`"; + if visibility == public { + s.push_str("pub") + } else { + s.push_str("priv") + } + s.push_char('`'); self.span_fatal(*self.last_span, s); } return iovi_none; |
