mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-16 05:56:56 +00:00
14 lines
164 B
Rust
14 lines
164 B
Rust
//@ known-bug: #132882
|
|
|
|
use std::ops::Add;
|
|
|
|
pub trait Numoid
|
|
where
|
|
for<N: Numoid> &'a Self: Add<Self>,
|
|
{
|
|
}
|
|
|
|
pub fn compute<N: Numoid>(a: N) -> N {
|
|
&a + a
|
|
}
|