-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of #112894 - GuillaumeGomez:gui-fields-display, r=notriddle
Fix union fields display ![Screenshot from 2023-06-21 16-47-24](https://github.com/rust-lang/rust/assets/3050060/833b0fe6-7fb6-4371-86c3-d82fa0c3fe49) So two bugs in this screenshot: no whitespace between field name and type name, both fields are on the same line. Both problems come from issues in the templates because all whitespace are removed if a askama "command" follows. r? `@notriddle`
- Loading branch information
Showing
7 changed files
with
61 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// This test checks that fields are displayed as expected (one by line). | ||
go-to: "file://" + |DOC_PATH| + "/test_docs/fields/struct.Struct.html" | ||
store-position: ("#structfield\.a", {"y": a_y}) | ||
store-position: ("#structfield\.b", {"y": b_y}) | ||
assert: |a_y| < |b_y| | ||
|
||
go-to: "file://" + |DOC_PATH| + "/test_docs/fields/union.Union.html" | ||
store-position: ("#structfield\.a", {"y": a_y}) | ||
store-position: ("#structfield\.b", {"y": b_y}) | ||
assert: |a_y| < |b_y| | ||
|
||
go-to: "file://" + |DOC_PATH| + "/test_docs/fields/enum.Enum.html" | ||
store-position: ("#variant\.A\.field\.a", {"y": a_y}) | ||
store-position: ("#variant\.A\.field\.b", {"y": b_y}) | ||
assert: |a_y| < |b_y| | ||
store-position: ("#variant\.B\.field\.a", {"y": a_y}) | ||
store-position: ("#variant\.B\.field\.b", {"y": b_y}) | ||
assert: |a_y| < |b_y| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#![crate_name = "foo"] | ||
|
||
// @has 'foo/union.Union.html' | ||
// Checking that there is a whitespace after `:`. | ||
// @has - '//*[@id="structfield.a"]/code' 'a: u8' | ||
// @has - '//*[@id="structfield.b"]/code' 'b: u32' | ||
pub union Union { | ||
pub a: u8, | ||
/// tadam | ||
pub b: u32, | ||
} |