mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
12 lines
166 B
Rust
12 lines
166 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() {}
|