@@ -300,16 +300,6 @@ pub trait BorrowckErrors<'cx>: Sized + Copy {
300
300
err
301
301
}
302
302
303
- fn cannot_move_into_closure ( self , span : Span , desc : & str , _: Origin ) -> DiagnosticBuilder < ' cx > {
304
- struct_span_err ! (
305
- self ,
306
- span,
307
- E0504 ,
308
- "cannot move `{}` into closure because it is borrowed" ,
309
- desc,
310
- )
311
- }
312
-
313
303
fn cannot_reassign_immutable (
314
304
self ,
315
305
span : Span ,
@@ -336,10 +326,6 @@ pub trait BorrowckErrors<'cx>: Sized + Copy {
336
326
struct_span_err ! ( self , span, E0594 , "cannot assign to {}" , desc)
337
327
}
338
328
339
- fn cannot_assign_static ( self , span : Span , desc : & str , o : Origin ) -> DiagnosticBuilder < ' cx > {
340
- self . cannot_assign ( span, & format ! ( "immutable static item `{}`" , desc) , o)
341
- }
342
-
343
329
fn cannot_move_out_of (
344
330
self ,
345
331
move_from_span : Span ,
@@ -422,36 +408,6 @@ pub trait BorrowckErrors<'cx>: Sized + Copy {
422
408
)
423
409
}
424
410
425
- fn cannot_partially_reinit_an_uninit_struct (
426
- self ,
427
- span : Span ,
428
- uninit_path : & str ,
429
- _: Origin ,
430
- ) -> DiagnosticBuilder < ' cx > {
431
- struct_span_err ! (
432
- self ,
433
- span,
434
- E0383 ,
435
- "partial reinitialization of uninitialized structure `{}`" ,
436
- uninit_path,
437
- )
438
- }
439
-
440
- fn closure_cannot_assign_to_borrowed (
441
- self ,
442
- span : Span ,
443
- descr : & str ,
444
- _: Origin ,
445
- ) -> DiagnosticBuilder < ' cx > {
446
- struct_span_err ! (
447
- self ,
448
- span,
449
- E0595 ,
450
- "closure cannot assign to {}" ,
451
- descr,
452
- )
453
- }
454
-
455
411
fn cannot_borrow_path_as_mutable_because (
456
412
self ,
457
413
span : Span ,
@@ -469,15 +425,6 @@ pub trait BorrowckErrors<'cx>: Sized + Copy {
469
425
)
470
426
}
471
427
472
- fn cannot_borrow_path_as_mutable (
473
- self ,
474
- span : Span ,
475
- path : & str ,
476
- o : Origin ,
477
- ) -> DiagnosticBuilder < ' cx > {
478
- self . cannot_borrow_path_as_mutable_because ( span, path, "" , o)
479
- }
480
-
481
428
fn cannot_mutate_in_match_guard (
482
429
self ,
483
430
mutate_span : Span ,
@@ -569,58 +516,6 @@ pub trait BorrowckErrors<'cx>: Sized + Copy {
569
516
err
570
517
}
571
518
572
- fn lifetime_too_short_for_reborrow (
573
- self ,
574
- span : Span ,
575
- path : & str ,
576
- _: Origin ,
577
- ) -> DiagnosticBuilder < ' cx > {
578
- struct_span_err ! (
579
- self ,
580
- span,
581
- E0598 ,
582
- "lifetime of {} is too short to guarantee \
583
- its contents can be safely reborrowed",
584
- path,
585
- )
586
- }
587
-
588
- fn cannot_act_on_capture_in_sharable_fn (
589
- self ,
590
- span : Span ,
591
- bad_thing : & str ,
592
- help : ( Span , & str ) ,
593
- _: Origin ,
594
- ) -> DiagnosticBuilder < ' cx > {
595
- let ( help_span, help_msg) = help;
596
- let mut err = struct_span_err ! (
597
- self ,
598
- span,
599
- E0387 ,
600
- "{} in a captured outer variable in an `Fn` closure" ,
601
- bad_thing,
602
- ) ;
603
- err. span_help ( help_span, help_msg) ;
604
- err
605
- }
606
-
607
- fn cannot_assign_into_immutable_reference (
608
- self ,
609
- span : Span ,
610
- bad_thing : & str ,
611
- _: Origin ,
612
- ) -> DiagnosticBuilder < ' cx > {
613
- let mut err = struct_span_err ! (
614
- self ,
615
- span,
616
- E0389 ,
617
- "{} in a `&` reference" ,
618
- bad_thing,
619
- ) ;
620
- err. span_label ( span, "assignment into an immutable reference" ) ;
621
- err
622
- }
623
-
624
519
fn cannot_capture_in_long_lived_closure (
625
520
self ,
626
521
closure_span : Span ,
0 commit comments