Update tests/rustdoc to new test syntax · rust-lang/rust@1b67035 (original) (raw)

`@@ -6,44 +6,44 @@

`

6

6

``

7

7

`pub struct Foo;

`

8

8

``

9

``

`-

// @has 'foo/trait.Bar.html'

`

``

9

`+

//@ has 'foo/trait.Bar.html'

`

10

10

`pub trait Bar {

`

11

11

`// There should be no anchors here.

`

12

``

`-

// @snapshot no_type_anchor - '//*[@id="associatedtype.T"]'

`

``

12

`+

//@ snapshot no_type_anchor - '//*[@id="associatedtype.T"]'

`

13

13

`type T;

`

14

14

`// There should be no anchors here.

`

15

``

`-

// @snapshot no_const_anchor - '//*[@id="associatedconstant.YOLO"]'

`

``

15

`+

//@ snapshot no_const_anchor - '//*[@id="associatedconstant.YOLO"]'

`

16

16

`const YOLO: u32;

`

17

17

``

18

18

`// There should be no anchors here.

`

19

``

`-

// @snapshot no_tymethod_anchor - '//*[@id="tymethod.foo"]'

`

``

19

`+

//@ snapshot no_tymethod_anchor - '//*[@id="tymethod.foo"]'

`

20

20

`fn foo();

`

21

21

`// There should be no anchors here.

`

22

``

`-

// @snapshot no_trait_method_anchor - '//*[@id="method.bar"]'

`

``

22

`+

//@ snapshot no_trait_method_anchor - '//*[@id="method.bar"]'

`

23

23

`fn bar() {}

`

24

24

`}

`

25

25

``

26

``

`-

// @has 'foo/struct.Foo.html'

`

``

26

`+

//@ has 'foo/struct.Foo.html'

`

27

27

`impl Bar for Foo {

`

28

``

`-

// @has - '//*[@id="associatedtype.T"]/a[@class="anchor"]' ''

`

``

28

`+

//@ has - '//*[@id="associatedtype.T"]/a[@class="anchor"]' ''

`

29

29

`type T = u32;

`

30

``

`-

// @has - '//*[@id="associatedconstant.YOLO"]/a[@class="anchor"]' ''

`

``

30

`+

//@ has - '//*[@id="associatedconstant.YOLO"]/a[@class="anchor"]' ''

`

31

31

`const YOLO: u32 = 0;

`

32

32

``

33

``

`-

// @has - '//*[@id="method.foo"]/a[@class="anchor"]' ''

`

``

33

`+

//@ has - '//*[@id="method.foo"]/a[@class="anchor"]' ''

`

34

34

`fn foo() {}

`

35

35

`// Same check for provided "bar" method.

`

36

``

`-

// @has - '//*[@id="method.bar"]/a[@class="anchor"]' ''

`

``

36

`+

//@ has - '//*[@id="method.bar"]/a[@class="anchor"]' ''

`

37

37

`}

`

38

38

``

39

39

`impl Foo {

`

40

``

`-

// @snapshot no_const_anchor2 - '//*[@id="associatedconstant.X"]'

`

``

40

`+

//@ snapshot no_const_anchor2 - '//*[@id="associatedconstant.X"]'

`

41

41

`// There should be no anchors here.

`

42

42

`pub const X: i32 = 0;

`

43

``

`-

// @snapshot no_type_anchor2 - '//*[@id="associatedtype.Y"]'

`

``

43

`+

//@ snapshot no_type_anchor2 - '//*[@id="associatedtype.Y"]'

`

44

44

`// There should be no anchors here.

`

45

45

`pub type Y = u32;

`

46

``

`-

// @snapshot no_method_anchor - '//*[@id="method.new"]'

`

``

46

`+

//@ snapshot no_method_anchor - '//*[@id="method.new"]'

`

47

47

`// There should be no anchors here.

`

48

48

`pub fn new() -> Self { Self }

`

49

49

`}

`