@@ -58,7 +58,7 @@ impl<'a, 'v> visit::Visitor<'v> for FmtVisitor<'a> {
58
58
}
59
59
}
60
60
ast:: Stmt_ :: StmtExpr ( ref ex, _) | ast:: Stmt_ :: StmtSemi ( ref ex, _) => {
61
- self . format_missing_with_indent ( stmt. span . lo , self . config ) ;
61
+ self . format_missing_with_indent ( stmt. span . lo ) ;
62
62
let suffix = if let ast:: Stmt_ :: StmtExpr ( ..) = stmt. node {
63
63
""
64
64
} else {
@@ -78,7 +78,7 @@ impl<'a, 'v> visit::Visitor<'v> for FmtVisitor<'a> {
78
78
}
79
79
}
80
80
ast:: Stmt_ :: StmtMac ( ref _mac, _macro_style) => {
81
- self . format_missing_with_indent ( stmt. span . lo , self . config ) ;
81
+ self . format_missing_with_indent ( stmt. span . lo ) ;
82
82
visit:: walk_stmt ( self , stmt) ;
83
83
}
84
84
}
@@ -108,15 +108,15 @@ impl<'a, 'v> visit::Visitor<'v> for FmtVisitor<'a> {
108
108
109
109
match b. expr {
110
110
Some ( ref e) => {
111
- self . format_missing_with_indent ( e. span . lo , self . config ) ;
111
+ self . format_missing_with_indent ( e. span . lo ) ;
112
112
self . visit_expr ( e) ;
113
113
}
114
114
None => { }
115
115
}
116
116
117
117
self . block_indent = self . block_indent . block_unindent ( self . config ) ;
118
118
// TODO: we should compress any newlines here to just one
119
- self . format_missing_with_indent ( b. span . hi - brace_compensation, self . config ) ;
119
+ self . format_missing_with_indent ( b. span . hi - brace_compensation) ;
120
120
self . buffer . push_str ( "}" ) ;
121
121
self . last_pos = b. span . hi ;
122
122
}
@@ -165,7 +165,7 @@ impl<'a, 'v> visit::Visitor<'v> for FmtVisitor<'a> {
165
165
} ;
166
166
167
167
if let Some ( fn_str) = rewrite {
168
- self . format_missing_with_indent ( s. lo , self . config ) ;
168
+ self . format_missing_with_indent ( s. lo ) ;
169
169
self . buffer . push_str ( & fn_str) ;
170
170
} else {
171
171
self . format_missing ( b. span . lo ) ;
@@ -200,26 +200,26 @@ impl<'a, 'v> visit::Visitor<'v> for FmtVisitor<'a> {
200
200
self . block_indent = self . block_indent . block_unindent ( self . config ) ;
201
201
}
202
202
ast:: Item_ :: ItemExternCrate ( _) => {
203
- self . format_missing_with_indent ( item. span . lo , self . config ) ;
203
+ self . format_missing_with_indent ( item. span . lo ) ;
204
204
let new_str = self . snippet ( item. span ) ;
205
205
self . buffer . push_str ( & new_str) ;
206
206
self . last_pos = item. span . hi ;
207
207
}
208
208
ast:: Item_ :: ItemStruct ( ref def, ref generics) => {
209
- self . format_missing_with_indent ( item. span . lo , self . config ) ;
209
+ self . format_missing_with_indent ( item. span . lo ) ;
210
210
self . visit_struct ( item. ident , item. vis , def, generics, item. span ) ;
211
211
}
212
212
ast:: Item_ :: ItemEnum ( ref def, ref generics) => {
213
- self . format_missing_with_indent ( item. span . lo , self . config ) ;
213
+ self . format_missing_with_indent ( item. span . lo ) ;
214
214
self . visit_enum ( item. ident , item. vis , def, generics, item. span ) ;
215
215
self . last_pos = item. span . hi ;
216
216
}
217
217
ast:: Item_ :: ItemMod ( ref module) => {
218
- self . format_missing_with_indent ( item. span . lo , self . config ) ;
218
+ self . format_missing_with_indent ( item. span . lo ) ;
219
219
self . format_mod ( module, item. span , item. ident ) ;
220
220
}
221
221
ast:: Item_ :: ItemMac ( ..) => {
222
- self . format_missing_with_indent ( item. span . lo , self . config ) ;
222
+ self . format_missing_with_indent ( item. span . lo ) ;
223
223
// TODO: we cannot format these yet, because of a bad span.
224
224
// See rust lang issue #28424.
225
225
// visit::walk_item(self, item);
@@ -236,7 +236,7 @@ impl<'a, 'v> visit::Visitor<'v> for FmtVisitor<'a> {
236
236
}
237
237
238
238
if let ast:: TraitItem_ :: MethodTraitItem ( ref sig, None ) = ti. node {
239
- self . format_missing_with_indent ( ti. span . lo , self . config ) ;
239
+ self . format_missing_with_indent ( ti. span . lo ) ;
240
240
241
241
let indent = self . block_indent ;
242
242
let new_fn = self . rewrite_required_fn ( indent, ti. ident , sig, ti. span ) ;
@@ -300,7 +300,7 @@ impl<'a> FmtVisitor<'a> {
300
300
}
301
301
302
302
let first = & attrs[ 0 ] ;
303
- self . format_missing_with_indent ( first. span . lo , self . config ) ;
303
+ self . format_missing_with_indent ( first. span . lo ) ;
304
304
305
305
if utils:: contains_skip ( attrs) {
306
306
true
@@ -366,12 +366,12 @@ impl<'a> FmtVisitor<'a> {
366
366
}
367
367
Some ( ref s) => {
368
368
let s = format ! ( "{}use {};" , vis, s) ;
369
- self . format_missing_with_indent ( span. lo , self . config ) ;
369
+ self . format_missing_with_indent ( span. lo ) ;
370
370
self . buffer . push_str ( & s) ;
371
371
self . last_pos = span. hi ;
372
372
}
373
373
None => {
374
- self . format_missing_with_indent ( span. lo , self . config ) ;
374
+ self . format_missing_with_indent ( span. lo ) ;
375
375
self . format_missing ( span. hi ) ;
376
376
}
377
377
}
0 commit comments