]> git.lizzy.rs Git - rust.git/blob - src/test/ui/mismatched_types/binops.rs
Merge commit 'bf1c6f9871f430e284b17aa44059e0d0395e28a6' into clippyup
[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 `std::result::Result<{integer}, _>`
8 }