Skip to content

Commit d2922e5

Browse files
authoredJan 8, 2020
Rollup merge of #68023 - FSciammarella:master, r=Centril,varkor
Fix issue #68008 Correcting Typo on error message. From "substract" to "subtract". Fixes #68008.
2 parents 1355fb5 + 7de174b commit d2922e5

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)
Please sign in to comment.