path2: Remove .with_display_str and friends

Rewrite these methods as methods on Display and FilenameDisplay. This
turns

  do path.with_display_str |s| { ... }

into

  do path.display().with_str |s| { ... }
This commit is contained in:
Kevin Ballard
2013-10-06 18:51:49 -07:00
parent d6d9b92683
commit c01a97b7a9
12 changed files with 131 additions and 126 deletions

View File

@@ -4038,12 +4038,12 @@ impl Parser {
let stack = &self.sess.included_mod_stack;
let mut err = ~"circular modules: ";
for p in stack.slice(i, stack.len()).iter() {
do p.with_display_str |s| {
do p.display().with_str |s| {
err.push_str(s);
}
err.push_str(" -> ");
}
do path.with_display_str |s| {
do path.display().with_str |s| {
err.push_str(s);
}
self.span_fatal(id_sp, err);