mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 17:24:06 +00:00
11 lines
185 B
Rust
11 lines
185 B
Rust
#![crate_name="numeric"]
|
|
#![crate_type = "lib"]
|
|
|
|
pub trait Trig<T> {
|
|
fn sin(&self) -> T;
|
|
}
|
|
|
|
pub fn sin<T:Trig<R>, R>(theta: &T) -> R { theta.sin() }
|
|
|
|
pub trait Angle<T>: Trig<T> {}
|