@@ -350,36 +350,37 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
350
350
let mut visitor = ConditionVisitor { spans : & spans, name : & name, errors : vec ! [ ] } ;
351
351
visitor. visit_body ( & body) ;
352
352
353
- let isnt_initialized =
354
- if let InitializationRequiringAction :: PartialAssignment = desired_action {
355
- // The same error is emitted for bindings that are *sometimes* initialized and the ones
356
- // that are *partially* initialized by assigning to a field of an uninitialized
357
- // binding. We differentiate between them for more accurate wording here.
358
- "isn't fully initialized"
359
- } else if spans
360
- . iter ( )
361
- . filter ( |i| {
362
- // We filter these to avoid misleading wording in cases like the following,
363
- // where `x` has an `init`, but it is in the same place we're looking at:
364
- // ```
365
- // let x;
366
- // x += 1;
367
- // ```
368
- !i. contains ( span)
353
+ let isnt_initialized = if let InitializationRequiringAction :: PartialAssignment
354
+ | InitializationRequiringAction :: Assignment = desired_action
355
+ {
356
+ // The same error is emitted for bindings that are *sometimes* initialized and the ones
357
+ // that are *partially* initialized by assigning to a field of an uninitialized
358
+ // binding. We differentiate between them for more accurate wording here.
359
+ "isn't fully initialized"
360
+ } else if spans
361
+ . iter ( )
362
+ . filter ( |i| {
363
+ // We filter these to avoid misleading wording in cases like the following,
364
+ // where `x` has an `init`, but it is in the same place we're looking at:
365
+ // ```
366
+ // let x;
367
+ // x += 1;
368
+ // ```
369
+ !i. contains ( span)
369
370
// We filter these to avoid incorrect main message on `match-cfg-fake-edges.rs`
370
371
&& !visitor
371
372
. errors
372
373
. iter ( )
373
374
. map ( |( sp, _) | * sp)
374
375
. any ( |sp| span < sp && !sp. contains ( span) )
375
- } )
376
- . count ( )
377
- == 0
378
- {
379
- "isn't initialized"
380
- } else {
381
- "is possibly-uninitialized"
382
- } ;
376
+ } )
377
+ . count ( )
378
+ == 0
379
+ {
380
+ "isn't initialized"
381
+ } else {
382
+ "is possibly-uninitialized"
383
+ } ;
383
384
384
385
let used = desired_action. as_general_verb_in_past_tense ( ) ;
385
386
let mut err =
0 commit comments