rust/tests/rustdoc-js/where-clause.rs

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

50 lines
574 B
Rust
Raw Normal View History

pub struct Nested;
pub trait Trait<T> {
fn thank_you(x: T);
}
2024-06-03 02:35:56 -05:00
pub fn abracadabra<X>(_: X)
where
X: Trait<Nested>,
{
}
2024-06-03 02:35:56 -05:00
pub fn alacazam<X>() -> X
where
X: Trait<Nested>,
{
}
pub trait T1 {}
pub trait T2<'a, T> {
fn please(_: &'a T);
}
2024-06-03 02:35:56 -05:00
pub fn presto<A, B>(_: A, _: B)
where
A: T1,
B: for<'b> T2<'b, Nested>,
{
}
pub trait Shazam {}
2024-06-03 02:35:56 -05:00
pub fn bippety<X>() -> &'static X
where
X: Shazam,
{
panic!()
}
pub struct Drizzel<T>(T);
impl<T> Drizzel<T> {
2024-06-03 02:35:56 -05:00
pub fn boppety(&self) -> &T
where
T: Shazam,
{
panic!();
}
}