File: impl-doc-indent.goml

package info (click to toggle)
rustc 1.88.0%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 934,128 kB
  • sloc: xml: 158,127; python: 36,062; javascript: 19,855; sh: 19,700; cpp: 18,947; ansic: 12,993; asm: 4,792; makefile: 690; lisp: 29; perl: 29; ruby: 19; sql: 11
file content (16 lines) | stat: -rw-r--r-- 789 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Checks the impl block docs have the correct indent.
go-to: "file://" + |DOC_PATH| + "/test_docs/impls_indent/struct.Context.html"

// First we ensure that the impl items are indent (more on the right of the screen) than the
// impl itself.
store-position: ("#impl-Context", {"x": impl_x})
store-position: ("#impl-Context > .item-info", {"x": impl_item_x})
assert: |impl_x| < |impl_item_x|

// And we ensure that all impl items have the same indent.
assert-position: ("#impl-Context > .docblock", {"x": |impl_item_x|})
assert-position: ("#impl-Context + .docblock", {"x": |impl_item_x|})

// Same with the collapsible impl block.
assert-position: ("#impl-Context-1 > .docblock", {"x": |impl_item_x|})
assert-position: (".implementors-toggle > summary + .docblock", {"x": |impl_item_x|})