Update `tests/rustdoc` to new test syntax · rust-lang/rust@1b67035

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

6677

pub struct Foo;

889-

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

9+

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

1010

pub trait Bar {

1111

// There should be no anchors here.

12-

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

12+

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

1313

type T;

1414

// There should be no anchors here.

15-

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

15+

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

1616

const YOLO: u32;

17171818

// There should be no anchors here.

19-

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

19+

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

2020

fn foo();

2121

// There should be no anchors here.

22-

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

22+

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

2323

fn bar() {}

2424

}

252526-

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

26+

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

2727

impl Bar for Foo {

28-

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

28+

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

2929

type T = u32;

30-

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

30+

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

3131

const YOLO: u32 = 0;

323233-

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

33+

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

3434

fn foo() {}

3535

// Same check for provided "bar" method.

36-

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

36+

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

3737

}

38383939

impl Foo {

40-

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

40+

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

4141

// There should be no anchors here.

4242

pub const X: i32 = 0;

43-

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

43+

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

4444

// There should be no anchors here.

4545

pub type Y = u32;

46-

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

46+

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

4747

// There should be no anchors here.

4848

pub fn new() -> Self { Self }

4949

}