]> git.lizzy.rs Git - rust.git/blob - tests/rustdoc/bounds-in-multiple-parts.rs
Rollup merge of #106570 - Xaeroxe:div-duration-tests, r=JohnTitor
[rust.git] / tests / rustdoc / bounds-in-multiple-parts.rs
1 #![crate_name = "foo"]
2
3 pub trait Eq {}
4 pub trait Eq2 {}
5
6 // Checking that "where predicates" and "generics params" are merged.
7 // @has 'foo/trait.T.html'
8 // @has - "//*[@id='tymethod.f']/h4" "fn f<'a, 'b, 'c, T>()where Self: Eq, T: Eq + 'a, 'c: 'b + 'a,"
9 pub trait T {
10     fn f<'a, 'b, 'c: 'a, T: Eq + 'a>()
11         where Self: Eq, Self: Eq, T: Eq, 'c: 'b;
12 }
13
14 // Checking that a duplicated "where predicate" is removed.
15 // @has 'foo/trait.T2.html'
16 // @has - "//*[@id='tymethod.f']/h4" "fn f<T>()where Self: Eq + Eq2, T: Eq2 + Eq,"
17 pub trait T2 {
18     fn f<T: Eq>()
19         where Self: Eq, Self: Eq2, T: Eq2;
20 }