Skip to content

Commit 55b2944

Browse files
committed
Update attribute tests
1 parent 5c2820b commit 55b2944

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/test/rustdoc/attributes.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
#![crate_name = "foo"]
22

3-
// @has foo/fn.f.html '//*[@class="docblock attributes"]' '#[no_mangle]'
3+
// @has foo/fn.f.html '//*[@class="rust fn"]' '#[no_mangle]'
44
#[no_mangle]
55
pub extern "C" fn f() {}
66

7-
// @has foo/fn.g.html '//*[@class="docblock attributes"]' '#[export_name = "bar"]'
7+
// @has foo/fn.g.html '//*[@class="rust fn"]' '#[export_name = "bar"]'
88
#[export_name = "bar"]
99
pub extern "C" fn g() {}
1010

11-
// @matches foo/enum.Foo.html '//*[@class="docblock attributes top-attr"]' \
12-
// '(?m)\A#\[repr\(i64\)\]\n#\[must_use\]\Z'
11+
// @matches foo/enum.Foo.html '//*[@class="rust enum"]' \
12+
// '#\[repr\(i64\)\]\n#\[must_use\]'
1313
#[repr(i64)]
1414
#[must_use]
1515
pub enum Foo {
1616
Bar,
1717
}
1818

19-
// @has foo/struct.Repr.html '//*[@class="docblock attributes top-attr"]' '#[repr(C, align(8))]'
19+
// @has foo/struct.Repr.html '//*[@class="docblock type-decl"]' '#[repr(C, align(8))]'
2020
#[repr(C, align(8))]
2121
pub struct Repr;

src/test/rustdoc/trait-attributes.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33

44
pub trait Foo {
5-
// @has foo/trait.Foo.html '//h3[@id="tymethod.foo"]//span[@class="docblock attributes"]' '#[must_use]'
5+
// @has foo/trait.Foo.html '//h3[@id="tymethod.foo"]//div[@class="code-attribute"]' '#[must_use]'
66
#[must_use]
77
fn foo();
88
}
@@ -11,11 +11,11 @@ pub trait Foo {
1111
pub struct Bar;
1212

1313
impl Bar {
14-
// @has foo/struct.Bar.html '//h4[@id="method.bar"]//span[@class="docblock attributes"]' '#[must_use]'
14+
// @has foo/struct.Bar.html '//h4[@id="method.bar"]//div[@class="code-attribute"]' '#[must_use]'
1515
#[must_use]
1616
pub fn bar() {}
1717

18-
// @has foo/struct.Bar.html '//h4[@id="method.bar2"]//span[@class="docblock attributes"]' '#[must_use]'
18+
// @has foo/struct.Bar.html '//h4[@id="method.bar2"]//div[@class="code-attribute"]' '#[must_use]'
1919
#[must_use]
2020
pub fn bar2() {}
2121
}

0 commit comments

Comments
 (0)