File tree 3 files changed +5
-5
lines changed
3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -181,7 +181,7 @@ add_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64 }
181
181
/// ```
182
182
#[ lang = "sub" ]
183
183
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
184
- #[ rustc_on_unimplemented( message="cannot substract `{RHS}` from `{Self}`" ,
184
+ #[ rustc_on_unimplemented( message="cannot subtract `{RHS}` from `{Self}`" ,
185
185
label="no implementation for `{Self} - {RHS}`" ) ]
186
186
pub trait Sub < RHS =Self > {
187
187
/// The resulting type after applying the `-` operator.
@@ -716,7 +716,7 @@ add_assign_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64 }
716
716
/// ```
717
717
#[ lang = "sub_assign" ]
718
718
#[ stable( feature = "op_assign_traits" , since = "1.8.0" ) ]
719
- #[ rustc_on_unimplemented( message="cannot substract -assign `{Rhs}` from `{Self}`" ,
719
+ #[ rustc_on_unimplemented( message="cannot subtract -assign `{Rhs}` from `{Self}`" ,
720
720
label="no implementation for `{Self} -= {Rhs}`" ) ]
721
721
pub trait SubAssign < Rhs =Self > {
722
722
/// Performs the `-=` operation.
Original file line number Diff line number Diff line change 10
10
11
11
fn main ( ) {
12
12
1 + Some ( 1 ) ; //~ ERROR cannot add `std::option::Option<{integer}>` to `{integer}`
13
- 2 as usize - Some ( 1 ) ; //~ ERROR cannot substract `std::option::Option<{integer}>` from `usize`
13
+ 2 as usize - Some ( 1 ) ; //~ ERROR cannot subtract `std::option::Option<{integer}>` from `usize`
14
14
3 * ( ) ; //~ ERROR cannot multiply `()` to `{integer}`
15
15
4 / "" ; //~ ERROR cannot divide `{integer}` by `&str`
16
16
5 < String :: new ( ) ; //~ ERROR is not satisfied
Original file line number Diff line number Diff line change @@ -6,10 +6,10 @@ error[E0277]: cannot add `std::option::Option<{integer}>` to `{integer}`
6
6
|
7
7
= help: the trait `std::ops::Add<std::option::Option<{integer}>>` is not implemented for `{integer}`
8
8
9
- error[E0277]: cannot substract `std::option::Option<{integer}>` from `usize`
9
+ error[E0277]: cannot subtract `std::option::Option<{integer}>` from `usize`
10
10
--> $DIR/binops.rs:13:16
11
11
|
12
- 13 | 2 as usize - Some(1); //~ ERROR cannot substract `std::option::Option<{integer}>` from `usize`
12
+ 13 | 2 as usize - Some(1); //~ ERROR cannot subtract `std::option::Option<{integer}>` from `usize`
13
13
| ^ no implementation for `usize - std::option::Option<{integer}>`
14
14
|
15
15
= help: the trait `std::ops::Sub<std::option::Option<{integer}>>` is not implemented for `usize`
You can’t perform that action at this time.
0 commit comments