rust/tests/ui/issues/issue-20803.rs
2023-01-11 09:32:08 +00:00

10 lines
157 B
Rust

// run-pass
use std::ops::Add;
fn foo<T>(x: T) -> <i32 as Add<T>>::Output where i32: Add<T> {
42i32 + x
}
fn main() {
println!("{}", foo(0i32));
}