]> git.proxmox.com Git - rustc.git/blobdiff - src/librustc/infer/error_reporting/nice_region_error/different_lifetimes.rs
New upstream version 1.41.1+dfsg1
[rustc.git] / src / librustc / infer / error_reporting / nice_region_error / different_lifetimes.rs
index 979815fa7f1843199df09f4e141df8a246abf387..a431b541fa42fbd4d4353b72d29876397354cebe 100644 (file)
@@ -5,6 +5,8 @@ use crate::infer::error_reporting::nice_region_error::NiceRegionError;
 use crate::infer::error_reporting::nice_region_error::util::AnonymousParamInfo;
 use crate::util::common::ErrorReported;
 
+use rustc_error_codes::*;
+
 impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
     /// Print the error message for lifetime errors when both the concerned regions are anonymous.
     ///
@@ -43,7 +45,7 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
     ///
     /// It will later be extended to trait objects.
     pub(super) fn try_report_anon_anon_conflict(&self) -> Option<ErrorReported> {
-        let (span, sub, sup) = self.get_regions();
+        let (span, sub, sup) = self.regions();
 
         // Determine whether the sub and sup consist of both anonymous (elided) regions.
         let anon_reg_sup = self.tcx().is_suitable_region(sup)?;