Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
chenyukang committed Jul 15, 2024
1 parent 578578d commit 3d85723
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1341,7 +1341,7 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, '_, 'infcx, 'tcx> {
};
err.span_suggestion_verbose(
span,
format!("consider {changing} this binding's type xxx"),
format!("consider {changing} this binding's type"),
sugg,
Applicability::HasPlaceholders,
);
Expand Down Expand Up @@ -1455,11 +1455,6 @@ fn suggest_ampmut<'tcx>(
// let x: &i32 = &'a 5;
// ^^ lifetime annotation not allowed
//
eprintln!("opt_assignment_rhs_span: {:?}", opt_assignment_rhs_span);
eprintln!(
"code result: {:?}",
tcx.sess.source_map().span_to_snippet(opt_assignment_rhs_span.unwrap())
);
if let Some(assignment_rhs_span) = opt_assignment_rhs_span
&& let Ok(src) = tcx.sess.source_map().span_to_snippet(assignment_rhs_span)
&& let Some(stripped) = src.strip_prefix('&')
Expand Down

0 comments on commit 3d85723

Please sign in to comment.