summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-22258.rs
blob: 93ead5818d59557b630195de490156b26c24a94c (plain)
1
2
3
4
5
6
7
8
9
10
// run-pass
use std::ops::Add;

fn f<T: Add>(a: T, b: T) -> <T as Add>::Output {
    a + b
}

fn main() {
    println!("a + b is {}", f::<f32>(100f32, 200f32));
}