librustc: Remove mutable fields from the language.
They're still parsed though, to get through bootstrapping.
This commit is contained in:
parent
c7522417d4
commit
db4573a776
19 changed files with 69 additions and 177 deletions
|
@ -703,14 +703,11 @@ pub fn print_struct(s: @ps,
|
|||
for struct_def.fields.each |field| {
|
||||
match field.node.kind {
|
||||
ast::unnamed_field => fail!(~"unexpected unnamed field"),
|
||||
ast::named_field(ident, mutability, visibility) => {
|
||||
ast::named_field(ident, visibility) => {
|
||||
hardbreak_if_not_bol(s);
|
||||
maybe_print_comment(s, field.span.lo);
|
||||
print_outer_attributes(s, field.node.attrs);
|
||||
print_visibility(s, visibility);
|
||||
if mutability == ast::struct_mutable {
|
||||
word_nbsp(s, ~"mut");
|
||||
}
|
||||
print_ident(s, ident);
|
||||
word_nbsp(s, ~":");
|
||||
print_type(s, field.node.ty);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue