]> git.lizzy.rs Git - rust.git/blob - tests/ui/mismatched_types/binops.rs
Auto merge of #106171 - compiler-errors:consolidate-extract_callable_info, r=estebank...
[rust.git] / tests / 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 }