Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,8 @@ impl<'tcx> Visitor<'tcx> for TyPathVisitor<'tcx> {
}

Some(rbv::ResolvedArg::LateBound(debruijn_index, _, id)) => {
debug!("FindNestedTypeVisitor::visit_ty: LateBound depth = {:?}", debruijn_index,);
debug!("id={:?}", id);
debug!("FindNestedTypeVisitor::visit_ty: LateBound depth = {debruijn_index:?}");
debug!("id={id:?}");
if debruijn_index == self.current_index && id.to_def_id() == self.region_def_id {
return ControlFlow::Break(());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,14 +239,14 @@ pub fn suggest_new_region_bound(
};
spans_suggs.push((fn_return.span.shrink_to_hi(), format!(" + {name} ")));
err.multipart_suggestion_verbose(
format!("{declare} `{ty}` {captures}, {use_lt}",),
format!("{declare} `{ty}` {captures}, {use_lt}"),
spans_suggs,
Applicability::MaybeIncorrect,
);
} else {
err.span_suggestion_verbose(
fn_return.span.shrink_to_hi(),
format!("{declare} `{ty}` {captures}, {explicit}",),
format!("{declare} `{ty}` {captures}, {explicit}"),
&plus_lt,
Applicability::MaybeIncorrect,
);
Expand All @@ -257,7 +257,7 @@ pub fn suggest_new_region_bound(
if let LifetimeKind::ImplicitObjectLifetimeDefault = lt.kind {
err.span_suggestion_verbose(
fn_return.span.shrink_to_hi(),
format!("{declare} the trait object {captures}, {explicit}",),
format!("{declare} the trait object {captures}, {explicit}"),
&plus_lt,
Applicability::MaybeIncorrect,
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
predicate
);
let post = if post.len() > 1 || (post.len() == 1 && post[0].contains('\n')) {
format!(":\n{}", post.iter().map(|p| format!("- {p}")).collect::<Vec<_>>().join("\n"),)
format!(":\n{}", post.iter().map(|p| format!("- {p}")).collect::<Vec<_>>().join("\n"))
} else if post.len() == 1 {
format!(": `{}`", post[0])
} else {
Expand All @@ -722,7 +722,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
err.note(format!("cannot satisfy `{predicate}`"));
}
(0, _, 1) => {
err.note(format!("{} in the `{}` crate{}", msg, crates[0], post,));
err.note(format!("{msg} in the `{}` crate{post}", crates[0]));
}
(0, _, _) => {
err.note(format!(
Expand All @@ -739,7 +739,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
(_, 1, 1) => {
let span: MultiSpan = spans.into();
err.span_note(span, msg);
err.note(format!("and another `impl` found in the `{}` crate{}", crates[0], post,));
err.note(format!("and another `impl` found in the `{}` crate{post}", crates[0]));
}
_ => {
let span: MultiSpan = spans.into();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2241,7 +2241,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
err.highlighted_span_help(
self.tcx.def_span(def_id),
vec![
StringPart::normal(format!("the trait `{trait_}` ",)),
StringPart::normal(format!("the trait `{trait_}` ")),
StringPart::highlighted("is"),
StringPart::normal(desc),
StringPart::highlighted(self_ty),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -888,7 +888,7 @@ impl<'tcx> OnUnimplementedFormatString {
}
} else {
let reported =
struct_span_code_err!(tcx.dcx(), self.span, E0231, "{}", e.description,)
struct_span_code_err!(tcx.dcx(), self.span, E0231, "{}", e.description)
.emit();
result = Err(reported);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
// `async`/`gen` constructs get lowered to a special kind of coroutine that
// should *not* `impl Coroutine`.
ty::Coroutine(did, ..) if self.tcx().is_general_coroutine(*did) => {
debug!(?self_ty, ?obligation, "assemble_coroutine_candidates",);
debug!(?self_ty, ?obligation, "assemble_coroutine_candidates");

candidates.vec.push(CoroutineCandidate);
}
Expand All @@ -334,7 +334,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
// async constructs get lowered to a special kind of coroutine that
// should directly `impl Future`.
if self.tcx().coroutine_is_async(*did) {
debug!(?self_ty, ?obligation, "assemble_future_candidates",);
debug!(?self_ty, ?obligation, "assemble_future_candidates");

candidates.vec.push(FutureCandidate);
}
Expand All @@ -352,7 +352,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
if let ty::Coroutine(did, ..) = self_ty.kind()
&& self.tcx().coroutine_is_gen(*did)
{
debug!(?self_ty, ?obligation, "assemble_iterator_candidates",);
debug!(?self_ty, ?obligation, "assemble_iterator_candidates");

candidates.vec.push(IteratorCandidate);
}
Expand All @@ -378,7 +378,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
// gen constructs get lowered to a special kind of coroutine that
// should directly `impl AsyncIterator`.
if self.tcx().coroutine_is_async_gen(did) {
debug!(?self_ty, ?obligation, "assemble_iterator_candidates",);
debug!(?self_ty, ?obligation, "assemble_iterator_candidates");

// Can only confirm this candidate if we have constrained
// the `Yield` type to at least `Poll<Option<?0>>`..
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_trait_selection/src/traits/select/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1223,7 +1223,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
&& self.match_fresh_trait_preds(stack.fresh_trait_pred, prev.fresh_trait_pred)
})
{
debug!("evaluate_stack --> unbound argument, recursive --> giving up",);
debug!("evaluate_stack --> unbound argument, recursive --> giving up");
return Ok(EvaluatedToAmbigStackDependent);
}

Expand Down
Loading