File tree Expand file tree Collapse file tree 3 files changed +31
-0
lines changed Expand file tree Collapse file tree 3 files changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,22 @@ assert-size: (".item-info", {"width": 840})
88assert-size: (".item-info .stab", {"width": 289})
99assert-position: (".item-info .stab", {"x": 245})
1010
11+ // We check that the display of the feature elements is not broken. It serves as regression
12+ // test for <https://github.com/rust-lang/rust/issues/118615>.
13+ set-window-size: (850, 800)
14+ store-position: (
15+ "//*[@class='stab portability']//code[text()='Win32_System']",
16+ {"x": first_line_x, "y": first_line_y},
17+ )
18+ store-position: (
19+ "//*[@class='stab portability']//code[text()='Win32_System_Diagnostics']",
20+ {"x": second_line_x, "y": second_line_y},
21+ )
22+ assert: |first_line_x| != |second_line_x| && |first_line_x| == 516 && |second_line_x| == 272
23+ assert: |first_line_y| != |second_line_y| && |first_line_y| == 688 && |second_line_y| == 711
24+
1125// Now we ensure that they're not rendered on the same line.
26+ set-window-size: (1100, 800)
1227go-to: "file://" + |DOC_PATH| + "/lib2/trait.Trait.html"
1328// We first ensure that there are two item info on the trait.
1429assert-count: ("#main-content > .item-info .stab", 2)
Original file line number Diff line number Diff line change @@ -6,6 +6,13 @@ edition = "2018"
66[lib ]
77path = " lib.rs"
88
9+ [features ]
10+ Win32 = [" Win32_System" ]
11+ Win32_System = [" Win32_System_Diagnostics" ]
12+ Win32_System_Diagnostics = [" Win32_System_Diagnostics_Debug" ]
13+ Win32_System_Diagnostics_Debug = []
14+ default = [" Win32" ]
15+
916[dependencies ]
1017implementors = { path = " ./implementors" }
1118http = { path = " ./http" }
Original file line number Diff line number Diff line change 11// ignore-tidy-linelength
22
33#![ feature( doc_cfg) ]
4+ #![ feature( doc_auto_cfg) ]
45
56pub mod another_folder;
67pub mod another_mod;
@@ -28,6 +29,14 @@ impl Foo {
2829 /// Some documentation
2930 /// # A Heading
3031 pub fn a_method ( & self ) { }
32+
33+ #[ cfg( all(
34+ feature = "Win32" ,
35+ feature = "Win32_System" ,
36+ feature = "Win32_System_Diagnostics" ,
37+ feature = "Win32_System_Diagnostics_Debug"
38+ ) ) ]
39+ pub fn lot_of_features ( ) { }
3140}
3241
3342#[ doc( cfg( feature = "foo-method" ) ) ]
You can’t perform that action at this time.
0 commit comments