]> git.lizzy.rs Git - rust.git/blob - tests/ui/block-result/issue-22645.rs
Rollup merge of #106707 - ehuss:remove-dupe-sha-1, r=Mark-Simulacrum
[rust.git] / tests / ui / block-result / issue-22645.rs
1 use std::ops::Add;
2
3 trait Scalar {}
4 impl Scalar for f64 {}
5
6 struct Bob;
7
8 impl<RHS: Scalar> Add <RHS> for Bob {
9   type Output = Bob;
10   fn add(self, rhs : RHS) -> Bob { Bob }
11 }
12
13 fn main() {
14   let b = Bob + 3.5;
15   b + 3 //~ ERROR E0277
16   //~^ ERROR: mismatched types
17 }