Skip to content

Commit d232be8

Browse files
committed
Fix tidy checks
1 parent bc29f1d commit d232be8

File tree

1 file changed

+19
-22
lines changed

1 file changed

+19
-22
lines changed

src/librustc_trait_selection/traits/error_reporting/suggestions.rs

+19-22
Original file line numberDiff line numberDiff line change
@@ -570,33 +570,30 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> {
570570
// original type obligation, not the last one that failed, which is arbitrary.
571571
// Because of this, we modify the error to refer to the original obligation and
572572
// return early in the caller.
573-
574573

575574
let has_colon = self
576-
.tcx
577-
.sess
578-
.source_map()
579-
.span_to_snippet(span)
580-
.map(|w| w.contains(":"))
581-
.unwrap_or(false);
575+
.tcx
576+
.sess
577+
.source_map()
578+
.span_to_snippet(span)
579+
.map(|w| w.contains(":"))
580+
.unwrap_or(false);
582581

583582
let has_double_colon = self
584-
.tcx
585-
.sess
586-
.source_map()
587-
.span_to_snippet(span)
588-
.map(|w| w.contains("::"))
589-
.unwrap_or(false);
583+
.tcx
584+
.sess
585+
.source_map()
586+
.span_to_snippet(span)
587+
.map(|w| w.contains("::"))
588+
.unwrap_or(false);
590589

591590
let has_bracket = self
592-
.tcx
593-
.sess
594-
.source_map()
595-
.span_to_snippet(span)
596-
.map(|w| w.contains("{"))
597-
.unwrap_or(false);
598-
599-
591+
.tcx
592+
.sess
593+
.source_map()
594+
.span_to_snippet(span)
595+
.map(|w| w.contains("{"))
596+
.unwrap_or(false);
600597

601598
let msg = format!(
602599
"the trait bound `{}: {}` is not satisfied",
@@ -620,7 +617,7 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> {
620617
obligation.parent_trait_ref.skip_binder().print_only_trait_path(),
621618
),
622619
);
623-
620+
624621
// This if is to prevent a special edge-case
625622
if !has_colon || has_double_colon || has_bracket {
626623
// We don't want a borrowing suggestion on the fields in structs,

0 commit comments

Comments
 (0)