1
Fork 0

make ref x bindings produce region ptrs and fix various minor bugs

we now detect inconsistent modes, binding names, and various other errors.
typeck/trans integration is mostly done.

borrowck not so much.

more tests needed.
This commit is contained in:
Niko Matsakis 2012-08-06 07:20:23 -07:00
parent ecaf9e39c9
commit a6a5c48c64
19 changed files with 339 additions and 176 deletions

View file

@ -1332,8 +1332,12 @@ fn print_pat(s: ps, &&pat: @ast::pat) {
ast::pat_wild => word(s.s, ~"_"),
ast::pat_ident(binding_mode, path, sub) => {
match binding_mode {
ast::bind_by_ref => word_space(s, ~"ref"),
ast::bind_by_value => ()
ast::bind_by_ref(mutbl) => {
word_nbsp(s, ~"ref");
print_mutability(s, mutbl);
}
ast::bind_by_implicit_ref |
ast::bind_by_value => {}
}
print_path(s, path, true);
match sub {