Skip to content

Commit

Permalink
Rollup merge of rust-lang#68023 - FSciammarella:master, r=Centril,varkor
Browse files Browse the repository at this point in the history
Fix issue rust-lang#68008

Correcting Typo on error message. From "substract" to "subtract".

Fixes rust-lang#68008.
  • Loading branch information
Centril authored Jan 8, 2020
2 parents 1355fb5 + 7de174b commit d2922e5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/librustc_typeck/check/op.rs
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
Some("std::ops::Add"),
),
hir::BinOpKind::Sub => (
format!("cannot substract `{}` from `{}`", rhs_ty, lhs_ty),
format!("cannot subtract `{}` from `{}`", rhs_ty, lhs_ty),
Some("std::ops::Sub"),
),
hir::BinOpKind::Mul => (
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/issues/issue-28837.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ fn main() {

a + a; //~ ERROR cannot add `A` to `A`

a - a; //~ ERROR cannot substract `A` from `A`
a - a; //~ ERROR cannot subtract `A` from `A`

a * a; //~ ERROR cannot multiply `A` to `A`

Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/issues/issue-28837.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ LL | a + a;
|
= note: an implementation of `std::ops::Add` might be missing for `A`

error[E0369]: cannot substract `A` from `A`
error[E0369]: cannot subtract `A` from `A`
--> $DIR/issue-28837.rs:8:7
|
LL | a - a;
Expand Down

0 comments on commit d2922e5

Please sign in to comment.