fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.3 KiB27 linesraw
1// This test ensures that the where conditions are correctly displayed.
2go-to: "file://" + |DOC_PATH| + "/lib2/trait.Whitespace.html"
3show-text: true
4// First, we check in the trait definition if the where clause is "on its own" (not on the same
5// line than "pub trait Whitespace<Idx>").
6compare-elements-position-false: (".item-decl code", ".where.fmt-newline", ("y"))
7// And that the code following it isn't on the same line either.
8compare-elements-position-false: (".item-decl .fn", ".where.fmt-newline", ("y"))
9
10go-to: "file://" + |DOC_PATH| + "/lib2/struct.WhereWhitespace.html"
11// We make the screen a bit wider to ensure that the trait impl is on one line.
12set-window-size: (915, 915)
13
14compare-elements-position-false: ("#method\.new .fn", "#method\.new .where.fmt-newline", ("y"))
15// We ensure that both the trait name and the struct name are on the same line in
16// "impl<K, T> Whitespace<&K> for WhereWhitespace<T>".
17compare-elements-position: (
18    "#trait-implementations-list .impl h3 .trait",
19    "#trait-implementations-list .impl h3 .struct",
20    ("y"),
21)
22// And we now check that the where condition isn't on the same line.
23compare-elements-position-false: (
24    "#trait-implementations-list .impl h3 .trait",
25    "#trait-implementations-list .impl h3 .where.fmt-newline",
26    ("y"),
27)