about summary refs log tree commit diff
path: root/tests/rustdoc-js/type-parameters.rs
blob: 0edbfbea178bd9f7840014531e131263f3b6798e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#![crate_name = "foo"]

pub trait Some {}
impl Some for () {}
pub trait Other {}
impl Other for () {}

pub fn alef<T: Some>() -> T {
    loop {}
}
pub fn alpha() -> impl Some {}

pub fn bet<T, U>(t: T) -> U {
    loop {}
}
pub fn beta<T>(t: T) -> T {}

pub fn other<T: Other, U: Other>(t: T, u: U) {
    loop {}
}
pub fn alternate<T: Other>(t: T, u: T) {
    loop {}
}