File tree 2 files changed +41
-0
lines changed
2 files changed +41
-0
lines changed Original file line number Diff line number Diff line change @@ -614,3 +614,9 @@ pub mod private {
614
614
B ,
615
615
}
616
616
}
617
+
618
+ pub mod trait_bounds {
619
+ pub trait OneBound : Sized { }
620
+ pub trait TwoBounds : Sized + Copy { }
621
+ pub trait ThreeBounds : Sized + Copy + Eq { }
622
+ }
Original file line number Diff line number Diff line change
1
+ // Check that if a trait has more than 2 bounds, they are displayed on different lines.
2
+
3
+ // It tries to load a JS for each trait but there are none since they're not implemented.
4
+ fail-on-request-error: false
5
+ go-to: "file://" + |DOC_PATH| + "/test_docs/trait_bounds/trait.OneBound.html"
6
+ // They should have the same Y position.
7
+ compare-elements-position: (
8
+ ".item-decl code",
9
+ ".item-decl a.trait[title='trait core::marker::Sized']",
10
+ ["y"],
11
+ )
12
+ go-to: "file://" + |DOC_PATH| + "/test_docs/trait_bounds/trait.TwoBounds.html"
13
+ // They should have the same Y position.
14
+ compare-elements-position: (
15
+ ".item-decl code",
16
+ ".item-decl a.trait[title='trait core::marker::Copy']",
17
+ ["y"],
18
+ )
19
+ go-to: "file://" + |DOC_PATH| + "/test_docs/trait_bounds/trait.ThreeBounds.html"
20
+ // All on their own line.
21
+ compare-elements-position-false: (
22
+ ".item-decl code",
23
+ ".item-decl a.trait[title='trait core::marker::Sized']",
24
+ ["y"],
25
+ )
26
+ compare-elements-position-false: (
27
+ ".item-decl a.trait[title='trait core::marker::Sized']",
28
+ ".item-decl a.trait[title='trait core::marker::Copy']",
29
+ ["y"],
30
+ )
31
+ compare-elements-position-false: (
32
+ ".item-decl a.trait[title='trait core::marker::Copy']",
33
+ ".item-decl a.trait[title='trait core::cmp::Eq']",
34
+ ["y"],
35
+ )
You can’t perform that action at this time.
0 commit comments