Skip to content

Commit 7de174b

Browse files
committed
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"
1 parent 7e393b5 commit 7de174b

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/librustc_typeck/check/op.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
330330
Some("std::ops::Add"),
331331
),
332332
hir::BinOpKind::Sub => (
333-
format!("cannot substract `{}` from `{}`", rhs_ty, lhs_ty),
333+
format!("cannot subtract `{}` from `{}`", rhs_ty, lhs_ty),
334334
Some("std::ops::Sub"),
335335
),
336336
hir::BinOpKind::Mul => (

src/test/ui/issues/issue-28837.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ fn main() {
55

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

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

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

src/test/ui/issues/issue-28837.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ LL | a + a;
88
|
99
= note: an implementation of `std::ops::Add` might be missing for `A`
1010

11-
error[E0369]: cannot substract `A` from `A`
11+
error[E0369]: cannot subtract `A` from `A`
1212
--> $DIR/issue-28837.rs:8:7
1313
|
1414
LL | a - a;

0 commit comments

Comments
 (0)