@@ -578,11 +578,6 @@ impl<'a, 'tcx> ErrorReporting<'tcx> for InferCtxt<'a, 'tcx> {
578
578
// where the error was detected. But that span is not readily
579
579
// accessible.
580
580
581
- let is_warning = match origin {
582
- infer:: RFC1214Subregion ( _) => true ,
583
- _ => false ,
584
- } ;
585
-
586
581
let labeled_user_string = match bound_kind {
587
582
GenericKind :: Param ( ref p) =>
588
583
format ! ( "the parameter type `{}`" , p) ,
@@ -593,8 +588,8 @@ impl<'a, 'tcx> ErrorReporting<'tcx> for InferCtxt<'a, 'tcx> {
593
588
match sub {
594
589
ty:: ReFree ( ty:: FreeRegion { bound_region : ty:: BrNamed ( ..) , ..} ) => {
595
590
// Does the required lifetime have a nice name we can print?
596
- span_err_or_warn ! (
597
- is_warning , self . tcx. sess, origin. span( ) , E0309 ,
591
+ span_err ! (
592
+ self . tcx. sess, origin. span( ) , E0309 ,
598
593
"{} may not live long enough" , labeled_user_string) ;
599
594
self . tcx . sess . fileline_help (
600
595
origin. span ( ) ,
@@ -606,8 +601,8 @@ impl<'a, 'tcx> ErrorReporting<'tcx> for InferCtxt<'a, 'tcx> {
606
601
607
602
ty:: ReStatic => {
608
603
// Does the required lifetime have a nice name we can print?
609
- span_err_or_warn ! (
610
- is_warning , self . tcx. sess, origin. span( ) , E0310 ,
604
+ span_err ! (
605
+ self . tcx. sess, origin. span( ) , E0310 ,
611
606
"{} may not live long enough" , labeled_user_string) ;
612
607
self . tcx . sess . fileline_help (
613
608
origin. span ( ) ,
@@ -618,8 +613,8 @@ impl<'a, 'tcx> ErrorReporting<'tcx> for InferCtxt<'a, 'tcx> {
618
613
619
614
_ => {
620
615
// If not, be less specific.
621
- span_err_or_warn ! (
622
- is_warning , self . tcx. sess, origin. span( ) , E0311 ,
616
+ span_err ! (
617
+ self . tcx. sess, origin. span( ) , E0311 ,
623
618
"{} may not live long enough" ,
624
619
labeled_user_string) ;
625
620
self . tcx . sess . fileline_help (
@@ -634,10 +629,6 @@ impl<'a, 'tcx> ErrorReporting<'tcx> for InferCtxt<'a, 'tcx> {
634
629
}
635
630
}
636
631
637
- if is_warning {
638
- self . tcx . sess . note_rfc_1214 ( origin. span ( ) ) ;
639
- }
640
-
641
632
self . note_region_origin ( & origin) ;
642
633
}
643
634
@@ -646,13 +637,6 @@ impl<'a, 'tcx> ErrorReporting<'tcx> for InferCtxt<'a, 'tcx> {
646
637
sub : Region ,
647
638
sup : Region ) {
648
639
match origin {
649
- infer:: RFC1214Subregion ( ref suborigin) => {
650
- // Ideally, this would be a warning, but it doesn't
651
- // seem to come up in practice, since the changes from
652
- // RFC1214 mostly trigger errors in type definitions
653
- // that don't wind up coming down this path.
654
- self . report_concrete_failure ( ( * * suborigin) . clone ( ) , sub, sup) ;
655
- }
656
640
infer:: Subtype ( trace) => {
657
641
let terr = TypeError :: RegionsDoesNotOutlive ( sup, sub) ;
658
642
self . report_and_explain_type_error ( trace, & terr) ;
@@ -1599,9 +1583,6 @@ impl<'a, 'tcx> ErrorReportingHelpers<'tcx> for InferCtxt<'a, 'tcx> {
1599
1583
1600
1584
fn note_region_origin ( & self , origin : & SubregionOrigin < ' tcx > ) {
1601
1585
match * origin {
1602
- infer:: RFC1214Subregion ( ref suborigin) => {
1603
- self . note_region_origin ( suborigin) ;
1604
- }
1605
1586
infer:: Subtype ( ref trace) => {
1606
1587
let desc = match trace. origin {
1607
1588
TypeOrigin :: Misc ( _) => {
0 commit comments