File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 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 }
181181/// ```
182182#[ lang = "sub" ]
183183#[ 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}`" ,
185185 label="no implementation for `{Self} - {RHS}`" ) ]
186186pub trait Sub < RHS =Self > {
187187 /// 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 }
716716/// ```
717717#[ lang = "sub_assign" ]
718718#[ 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}`" ,
720720 label="no implementation for `{Self} -= {Rhs}`" ) ]
721721pub trait SubAssign < Rhs =Self > {
722722 /// Performs the `-=` operation.
Original file line number Diff line number Diff line change 1010
1111fn main ( ) {
1212 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`
1414 3 * ( ) ; //~ ERROR cannot multiply `()` to `{integer}`
1515 4 / "" ; //~ ERROR cannot divide `{integer}` by `&str`
1616 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}`
66 |
77 = help: the trait `std::ops::Add<std::option::Option<{integer}>>` is not implemented for `{integer}`
88
9- error[E0277]: cannot substract `std::option::Option<{integer}>` from `usize`
9+ error[E0277]: cannot subtract `std::option::Option<{integer}>` from `usize`
1010 --> $DIR/binops.rs:13:16
1111 |
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`
1313 | ^ no implementation for `usize - std::option::Option<{integer}>`
1414 |
1515 = 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