diff options
| author | Kevin Ballard <kevin@sb.org> | 2014-02-07 19:45:48 -0800 |
|---|---|---|
| committer | Kevin Ballard <kevin@sb.org> | 2014-02-07 22:31:52 -0800 |
| commit | 1d17c2129ec696d81e6c6caee8b1740dd9509090 (patch) | |
| tree | 82db5e94279972bd3d12d4fa5fc765b7c0bc891e /src/libsyntax/parse/parser.rs | |
| parent | 086c0dd33febb752b036fba62dcfb8aa22a51642 (diff) | |
| download | rust-1d17c2129ec696d81e6c6caee8b1740dd9509090.tar.gz rust-1d17c2129ec696d81e6c6caee8b1740dd9509090.zip | |
Rewrite path::Display to reduce unnecessary allocation
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index aeeae94238b..93574f4d858 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -4200,10 +4200,10 @@ impl Parser { let mut err = ~"circular modules: "; let len = included_mod_stack.get().len(); for p in included_mod_stack.get().slice(i, len).iter() { - p.display().with_str(|s| err.push_str(s)); + err.push_str(p.display().as_maybe_owned().as_slice()); err.push_str(" -> "); } - path.display().with_str(|s| err.push_str(s)); + err.push_str(path.display().as_maybe_owned().as_slice()); self.span_fatal(id_sp, err); } None => () |
