Skip to content

Commit

Permalink
clean up comment text a bit
Browse files Browse the repository at this point in the history
Co-authored-by: Esteban Küber <[email protected]>
  • Loading branch information
iximeow and estebank committed Sep 14, 2020
1 parent 0eac38b commit e1607c8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions compiler/rustc_middle/src/ty/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ pub fn suggest_constraining_type_param(
// - insert: `, T: Zar`
//
// Additionally, there may be no `where` clause whatsoever in the case that this was
// reached becauase the generic parameter has a default:
// reached because the generic parameter has a default:
//
// Message:
// trait Foo<T=()> {... }
Expand All @@ -217,8 +217,8 @@ pub fn suggest_constraining_type_param(
if matches!(param.kind, hir::GenericParamKind::Type { default: Some(_), .. })
&& generics.where_clause.predicates.len() == 0
{
// Suggest a bound, but there are no existing where clauses for this `<T=Foo>`, so
// suggest adding one.
// Suggest a bound, but there is no existing `where` clause *and* the type param has a
// default (`<T=Foo>`), so we suggest adding `where T: Bar`.
err.span_suggestion_verbose(
generics.where_clause.tail_span_for_suggestion(),
&msg_restrict_type_further,
Expand Down

0 comments on commit e1607c8

Please sign in to comment.