Skip to content

Commit

Permalink
Rollup merge of rust-lang#98113 - EdwinRy:constraint-misspelling, r=c…
Browse files Browse the repository at this point in the history
…ompiler-errors

Fix misspelling of "constraint" as "contraint"

I misspelled a function name a while back
  • Loading branch information
JohnTitor authored Jun 15, 2022
2 parents b2d0e78 + c8b411e commit 1b8fc2f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler/rustc_ast_lowering/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -871,7 +871,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
self.lower_angle_bracketed_parameter_data(data, ParamMode::Explicit, itctx).0
}
GenericArgs::Parenthesized(ref data) => {
self.assoc_ty_contraint_param_error_emit(data);
self.emit_bad_parenthesized_trait_in_assoc_ty(data);
self.lower_angle_bracketed_parameter_data(
&data.as_angle_bracketed_args(),
ParamMode::Explicit,
Expand Down Expand Up @@ -982,7 +982,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
}
}

fn assoc_ty_contraint_param_error_emit(&self, data: &ParenthesizedArgs) -> () {
fn emit_bad_parenthesized_trait_in_assoc_ty(&self, data: &ParenthesizedArgs) {
let mut err = self.sess.struct_span_err(
data.span,
"parenthesized generic arguments cannot be used in associated type constraints",
Expand Down

0 comments on commit 1b8fc2f

Please sign in to comment.