mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 22:41:50 +00:00
13 lines
165 B
Rust
13 lines
165 B
Rust
// check-pass
|
|
#![allow(dead_code)]
|
|
use std::ops::Add;
|
|
|
|
fn ref_add<T>(a: &T, b: &T) -> T
|
|
where
|
|
for<'x> &'x T: Add<&'x T, Output = T>,
|
|
{
|
|
a + b
|
|
}
|
|
|
|
fn main() {}
|