diff options
Diffstat (limited to 'compiler/rustc_hir_analysis/src')
| -rw-r--r-- | compiler/rustc_hir_analysis/src/hir_ty_lowering/errors.rs | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/compiler/rustc_hir_analysis/src/hir_ty_lowering/errors.rs b/compiler/rustc_hir_analysis/src/hir_ty_lowering/errors.rs index 5e595488ea7..cd0451b4165 100644 --- a/compiler/rustc_hir_analysis/src/hir_ty_lowering/errors.rs +++ b/compiler/rustc_hir_analysis/src/hir_ty_lowering/errors.rs @@ -1257,14 +1257,12 @@ pub fn prohibit_assoc_item_constraint( }; // Now emit the suggestion - if let Ok(suggestion) = tcx.sess.source_map().span_to_snippet(removal_span) { - e.span_suggestion_verbose( - removal_span, - format!("consider removing this associated item {}", constraint.kind.descr()), - suggestion, - Applicability::MaybeIncorrect, - ); - } + e.span_suggestion_verbose( + removal_span, + format!("consider removing this associated item {}", constraint.kind.descr()), + "", + Applicability::MaybeIncorrect, + ); }; // Suggest replacing the associated item binding with a generic argument. |
