Skip to content

Commit 44378ac

Browse files
Fix errors in tests
1 parent fc496cf commit 44378ac

File tree

6 files changed

+17
-16
lines changed

6 files changed

+17
-16
lines changed

src/test/rustdoc/fn-type.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ pub struct Foo<'a, T> {
88
pub hrtb_lifetime: for<'b, 'c> fn(one: &'b i32, two: &'c &'b i32) -> (&'b i32, &'c i32),
99
}
1010

11-
// @has 'foo/struct.Foo.html' '//span[@id="structfield.generic"]' "generic: fn(val: &T) -> T"
12-
// @has 'foo/struct.Foo.html' '//span[@id="structfield.lifetime"]' "lifetime: fn(val: &'a i32) -> i32"
13-
// @has 'foo/struct.Foo.html' '//span[@id="structfield.hrtb_lifetime"]' "hrtb_lifetime: for<'b, 'c> fn(one: &'b i32, two: &'c &'b i32) -> (&'b i32, &'c i32)"
11+
// @has 'foo/struct.Foo.html'
12+
// @has - '//span[@id="structfield.generic"]' "generic: fn(val: &T) -> T"
13+
// @has - '//span[@id="structfield.lifetime"]' "lifetime: fn(val: &'a i32) -> i32"
14+
// @has - '//span[@id="structfield.hrtb_lifetime"]' "hrtb_lifetime: for<'b, 'c> fn(one: &'b i32, two: &'c &'b i32) -> (&'b i32, &'c i32)"

src/test/rustdoc/inline_cross/renamed-via-module.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@
77
extern crate foo;
88

99
// @has foo/iter/index.html
10-
// @has - '//a/[@href="struct.DeprecatedStepBy.html"]' "DeprecatedStepBy"
11-
// @has - '//a/[@href="struct.StepBy.html"]' "StepBy"
10+
// @has - '//a[@href="struct.DeprecatedStepBy.html"]' "DeprecatedStepBy"
11+
// @has - '//a[@href="struct.StepBy.html"]' "StepBy"
1212
// @has foo/iter/struct.DeprecatedStepBy.html
1313
// @has - '//h1' "Struct foo::iter::DeprecatedStepBy"
1414
// @has foo/iter/struct.StepBy.html
1515
// @has - '//h1' "Struct foo::iter::StepBy"
1616

1717
// @has bar/iter/index.html
18-
// @has - '//a/[@href="struct.DeprecatedStepBy.html"]' "DeprecatedStepBy"
19-
// @has - '//a/[@href="struct.StepBy.html"]' "StepBy"
18+
// @has - '//a[@href="struct.DeprecatedStepBy.html"]' "DeprecatedStepBy"
19+
// @has - '//a[@href="struct.StepBy.html"]' "StepBy"
2020
// @has bar/iter/struct.DeprecatedStepBy.html
2121
// @has - '//h1' "Struct bar::iter::DeprecatedStepBy"
2222
// @has bar/iter/struct.StepBy.html

src/test/rustdoc/intra-doc/private.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
// make sure to update `rustdoc-ui/intra-doc/private.rs` if you update this file
55

66
/// docs [DontDocMe] [DontDocMe::f] [DontDocMe::x]
7-
// @has private/struct.DocMe.html '//*a[@href="struct.DontDocMe.html"]' 'DontDocMe'
8-
// @has private/struct.DocMe.html '//*a[@href="struct.DontDocMe.html#method.f"]' 'DontDocMe::f'
9-
// @has private/struct.DocMe.html '//*a[@href="struct.DontDocMe.html#structfield.x"]' 'DontDocMe::x'
7+
// @has private/struct.DocMe.html '//a[@href="struct.DontDocMe.html"]' 'DontDocMe'
8+
// @has private/struct.DocMe.html '//a[@href="struct.DontDocMe.html#method.f"]' 'DontDocMe::f'
9+
// @has private/struct.DocMe.html '//a[@href="struct.DontDocMe.html#structfield.x"]' 'DontDocMe::x'
1010
pub struct DocMe;
1111
struct DontDocMe {
1212
x: usize,

src/test/rustdoc/primitive/no_std.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
#![deny(warnings)]
33
#![deny(rustdoc::broken_intra_doc_links)]
44

5-
// @has no_std/fn.foo.html '//a/[@href="{{channel}}/core/primitive.u8.html"]' 'u8'
6-
// @has no_std/fn.foo.html '//a/[@href="{{channel}}/core/primitive.u8.html"]' 'primitive link'
5+
// @has no_std/fn.foo.html '//a[@href="{{channel}}/core/primitive.u8.html"]' 'u8'
6+
// @has no_std/fn.foo.html '//a[@href="{{channel}}/core/primitive.u8.html"]' 'primitive link'
77
/// Link to [primitive link][u8]
88
pub fn foo() -> u8 {}
99

src/test/rustdoc/proc-macro.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#![crate_name="some_macros"]
77

88
// @has some_macros/index.html
9-
// @has - '//a/[@href="attr.some_proc_attr.html"]' 'some_proc_attr'
9+
// @has - '//a[@href="attr.some_proc_attr.html"]' 'some_proc_attr'
1010

1111
//! include a link to [some_proc_macro] to make sure it works.
1212

src/test/rustdoc/raw-ident-eliminate-r-hashtag.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ pub mod internal {
88
///
99
/// [name]: mod
1010
/// [other name]: crate::internal::mod
11-
// @has 'raw_ident_eliminate_r_hashtag/internal/struct.B.html' '//*a[@href="struct.mod.html"]' 'name'
12-
// @has 'raw_ident_eliminate_r_hashtag/internal/struct.B.html' '//*a[@href="struct.mod.html"]' 'other name'
11+
// @has 'raw_ident_eliminate_r_hashtag/internal/struct.B.html' '//a[@href="struct.mod.html"]' 'name'
12+
// @has 'raw_ident_eliminate_r_hashtag/internal/struct.B.html' '//a[@href="struct.mod.html"]' 'other name'
1313
pub struct B;
1414
}
1515

1616
/// See [name].
1717
///
1818
/// [name]: internal::mod
19-
// @has 'raw_ident_eliminate_r_hashtag/struct.A.html' '//*a[@href="internal/struct.mod.html"]' 'name'
19+
// @has 'raw_ident_eliminate_r_hashtag/struct.A.html' '//a[@href="internal/struct.mod.html"]' 'name'
2020
pub struct A;

0 commit comments

Comments
 (0)