rust/tests/rustdoc-js/type-parameters.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
369 B
Rust
Raw Normal View History

2024-06-03 02:35:56 -05:00
#![crate_name = "foo"]
pub trait Some {}
impl Some for () {}
pub trait Other {}
impl Other for () {}
2024-06-03 02:35:56 -05:00
pub fn alef<T: Some>() -> T {
loop {}
}
pub fn alpha() -> impl Some {}
2024-06-03 02:35:56 -05:00
pub fn bet<T, U>(t: T) -> U {
loop {}
}
pub fn beta<T>(t: T) -> T {}
2024-06-03 02:35:56 -05:00
pub fn other<T: Other, U: Other>(t: T, u: U) {
loop {}
}
pub fn alternate<T: Other>(t: T, u: T) {
loop {}
}