]> git.lizzy.rs Git - rust.git/blob - src/test/ui/mismatched_types/binops.rs
Rollup merge of #89945 - JohnTitor:we-now-specialize-clone-from-slice, r=the8472
[rust.git] / src / test / ui / mismatched_types / binops.rs
1 fn main() {
2     1 + Some(1); //~ ERROR cannot add `Option<{integer}>` to `{integer}`
3     2 as usize - Some(1); //~ ERROR cannot subtract `Option<{integer}>` from `usize`
4     3 * (); //~ ERROR cannot multiply `{integer}` by `()`
5     4 / ""; //~ ERROR cannot divide `{integer}` by `&str`
6     5 < String::new(); //~ ERROR can't compare `{integer}` with `String`
7     6 == Ok(1); //~ ERROR can't compare `{integer}` with `Result<{integer}, _>`
8 }