Improve error messages when illegal lifetimes are used

This commit is contained in:
Niko Matsakis
2013-02-27 16:21:07 -05:00
parent d26f6eddfd
commit 3280e5a33d
8 changed files with 110 additions and 57 deletions

View File

@@ -147,6 +147,10 @@ pub fn expr_to_str(e: @ast::expr, intr: @ident_interner) -> ~str {
to_str(e, print_expr, intr)
}
pub fn region_to_str(e: @ast::region, intr: @ident_interner) -> ~str {
to_str(e, |s, e| print_region(s, ~"&", e, ~""), intr)
}
pub fn tt_to_str(tt: ast::token_tree, intr: @ident_interner) -> ~str {
to_str(tt, print_tt, intr)
}