]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc/infer/error_reporting/nice_region_error/different_lifetimes.rs
rustc: async fn drop order lowering in HIR
[rust.git] / src / librustc / infer / error_reporting / nice_region_error / different_lifetimes.rs
index 944cc8a8b1999b0112ca47b95ea4ede49cb825fc..46785f7ada1feecd691074f3708c68f8abdb1c20 100644 (file)
@@ -86,12 +86,14 @@ pub(super) fn try_report_anon_anon_conflict(&self) -> Option<ErrorReported> {
         let sub_is_ret_type =
             self.is_return_type_anon(scope_def_id_sub, bregion_sub, ty_fndecl_sub);
 
-        let span_label_var1 = match anon_arg_sup.original_pat().simple_ident() {
+        let arg_sup_pat = self.tcx().hir().original_pat_of_argument(anon_arg_sup);
+        let span_label_var1 = match arg_sup_pat.simple_ident() {
             Some(simple_ident) => format!(" from `{}`", simple_ident),
             None => String::new(),
         };
 
-        let span_label_var2 = match anon_arg_sub.original_pat().simple_ident() {
+        let arg_sub_pat = self.tcx().hir().original_pat_of_argument(anon_arg_sub);
+        let span_label_var2 = match arg_sub_pat.simple_ident() {
             Some(simple_ident) => format!(" into `{}`", simple_ident),
             None => String::new(),
         };