diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-22258.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-22258.rs b/src/test/ui/issues/issue-22258.rs new file mode 100644 index 000000000..93ead5818 --- /dev/null +++ b/src/test/ui/issues/issue-22258.rs @@ -0,0 +1,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)); +} |