1
Fork 0

Fix Typo on cannot "substract"

Fix Typo on hir::BinOpKind::Sub

"substract" to "subtract"

Fix Typo on "Error cannot substract"

Fix Typo on cannot "substract"
This commit is contained in:
Felipe Sciammarella 2020-01-08 18:49:15 -03:00
parent 7e393b5b3b
commit 7de174b86e
3 changed files with 3 additions and 3 deletions

View file

@ -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 => (

View file

@ -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`

View file

@ -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;