Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fn foo<T: std::fmt::Debug + std::ops::Add<Output = T>>(item: T) -> impl std::ops::Add<Output = T> + std::fmt::Debug {
- item
- }
- fn main() {
- let bar = foo(10i8) + 20i8;
- println!("{:?}", bar);
- }
Add Comment
Please, Sign In to add comment