]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_infer/src/infer/error_reporting/nice_region_error/static_impl_trait.rs
Rollup merge of #91828 - oxalica:feat/waker-getters, r=dtolnay
[rust.git] / compiler / rustc_infer / src / infer / error_reporting / nice_region_error / static_impl_trait.rs
index 412a077959d01a9104d51275eaa26c3a69cc2f5d..0a9f59fbc9783dc378000dbf3520de5752927eed 100644 (file)
@@ -70,7 +70,7 @@ pub(super) fn try_report_static_impl_trait(&self) -> Option<ErrorReported> {
                             .map(|s| format!("`{}`", s))
                             .unwrap_or_else(|| "`fn` parameter".to_string()),
                         lifetime,
-                        ctxt.assoc_item.ident,
+                        ctxt.assoc_item.name,
                     );
                     err.span_label(param.param_ty_span, &format!("this data with {}...", lifetime));
                     err.span_label(
@@ -231,7 +231,7 @@ pub(super) fn try_report_static_impl_trait(&self) -> Option<ErrorReported> {
                 // Handle case of `impl Foo for dyn Bar { fn qux(&self) {} }` introducing a
                 // `'static` lifetime when called as a method on a binding: `bar.qux()`.
                 if self.find_impl_on_dyn_trait(&mut err, param.param_ty, &ctxt) {
-                    override_error_code = Some(ctxt.assoc_item.ident);
+                    override_error_code = Some(ctxt.assoc_item.name);
                 }
             }
         }
@@ -252,7 +252,7 @@ pub(super) fn try_report_static_impl_trait(&self) -> Option<ErrorReported> {
                     self.get_impl_ident_and_self_ty_from_trait(*item_def_id, &v.0)
                 {
                     if self.suggest_constrain_dyn_trait_in_impl(&mut err, &v.0, ident, self_ty) {
-                        override_error_code = Some(ident);
+                        override_error_code = Some(ident.name);
                     }
                 }
             }