Skip to content

Commit 37eed1d

Browse files
committed
Update tests: arity-2 @{has,matches} -> ...text
1 parent 01408fc commit 37eed1d

40 files changed

+168
-168
lines changed

src/test/rustdoc/deprecated-impls.rs

+14-14
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ pub struct Foo0;
55

66
impl Foo0 {
77
// @has - '//*[@class="stab deprecated"]' 'Deprecated since 1.0.1: fn_with_doc'
8-
// @has - 'fn_with_doc short'
9-
// @has - 'fn_with_doc full'
8+
// @hastext - 'fn_with_doc short'
9+
// @hastext - 'fn_with_doc full'
1010
/// fn_with_doc short
1111
///
1212
/// fn_with_doc full
@@ -52,8 +52,8 @@ pub struct Foo1;
5252

5353
impl Bar for Foo1 {
5454
// @has - '//*[@class="stab deprecated"]' 'Deprecated since 1.0.3: fn_empty_with_doc'
55-
// @has - 'fn_empty_with_doc_impl short'
56-
// @has - 'fn_empty_with_doc_impl full'
55+
// @hastext - 'fn_empty_with_doc_impl short'
56+
// @hastext - 'fn_empty_with_doc_impl full'
5757
/// fn_empty_with_doc_impl short
5858
///
5959
/// fn_empty_with_doc_impl full
@@ -63,8 +63,8 @@ impl Bar for Foo1 {
6363
fn fn_empty_without_doc() {}
6464

6565
// @has - '//*[@class="stab deprecated"]' 'Deprecated since 1.0.5: fn_def_with_doc'
66-
// @has - 'fn_def_with_doc_impl short'
67-
// @has - 'fn_def_with_doc_impl full'
66+
// @hastext - 'fn_def_with_doc_impl short'
67+
// @hastext - 'fn_def_with_doc_impl full'
6868
/// fn_def_with_doc_impl short
6969
///
7070
/// fn_def_with_doc_impl full
@@ -74,7 +74,7 @@ impl Bar for Foo1 {
7474
fn fn_def_without_doc() {}
7575

7676
// @has - '//*[@class="stab deprecated"]' 'Deprecated since 1.0.7: fn_def_def_with_doc'
77-
// @has - 'fn_def_def_with_doc short'
77+
// @hastext - 'fn_def_def_with_doc short'
7878
// @!has - 'fn_def_def_with_doc full'
7979

8080
// @has - '//*[@class="stab deprecated"]' 'Deprecated since 1.0.8: fn_def_def_without_doc'
@@ -85,33 +85,33 @@ pub struct Foo2;
8585

8686
impl Bar for Foo2 {
8787
// @has - '//*[@class="stab deprecated"]' 'Deprecated since 1.0.3: fn_empty_with_doc'
88-
// @has - 'fn_empty_with_doc short'
88+
// @hastext - 'fn_empty_with_doc short'
8989
// @!has - 'fn_empty_with_doc full'
9090
fn fn_empty_with_doc() {}
9191

9292
// @has - '//*[@class="stab deprecated"]' 'Deprecated since 1.0.4: fn_empty_without_doc'
93-
// @has - 'fn_empty_without_doc_impl short'
94-
// @has - 'fn_empty_without_doc_impl full'
93+
// @hastext - 'fn_empty_without_doc_impl short'
94+
// @hastext - 'fn_empty_without_doc_impl full'
9595
/// fn_empty_without_doc_impl short
9696
///
9797
/// fn_empty_without_doc_impl full
9898
fn fn_empty_without_doc() {}
9999

100100
// @has - '//*[@class="stab deprecated"]' 'Deprecated since 1.0.5: fn_def_with_doc'
101-
// @has - 'fn_def_with_doc short'
101+
// @hastext - 'fn_def_with_doc short'
102102
// @!has - 'fn_def_with_doc full'
103103
fn fn_def_with_doc() {}
104104

105105
// @has - '//*[@class="stab deprecated"]' 'Deprecated since 1.0.6: fn_def_without_doc'
106-
// @has - 'fn_def_without_doc_impl short'
107-
// @has - 'fn_def_without_doc_impl full'
106+
// @hastext - 'fn_def_without_doc_impl short'
107+
// @hastext - 'fn_def_without_doc_impl full'
108108
/// fn_def_without_doc_impl short
109109
///
110110
/// fn_def_without_doc_impl full
111111
fn fn_def_without_doc() {}
112112

113113
// @has - '//*[@class="stab deprecated"]' 'Deprecated since 1.0.7: fn_def_def_with_doc'
114-
// @has - 'fn_def_def_with_doc short'
114+
// @hastext - 'fn_def_def_with_doc short'
115115
// @!has - 'fn_def_def_with_doc full'
116116

117117
// @has - '//*[@class="stab deprecated"]' 'Deprecated since 1.0.8: fn_def_def_without_doc'

src/test/rustdoc/elided-lifetime.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -11,33 +11,33 @@ pub struct Ref<'a>(&'a u32);
1111
type ARef<'a> = Ref<'a>;
1212

1313
// @has foo/fn.test1.html
14-
// @matches - "Ref</a>&lt;'_&gt;"
14+
// @matchestext - "Ref</a>&lt;'_&gt;"
1515
pub fn test1(a: &u32) -> Ref {
1616
Ref(a)
1717
}
1818

1919
// @has foo/fn.test2.html
20-
// @matches - "Ref</a>&lt;'_&gt;"
20+
// @matchestext - "Ref</a>&lt;'_&gt;"
2121
pub fn test2(a: &u32) -> Ref<'_> {
2222
Ref(a)
2323
}
2424

2525
// @has foo/fn.test3.html
26-
// @matches - "Ref</a>&lt;'_&gt;"
26+
// @matchestext - "Ref</a>&lt;'_&gt;"
2727
pub fn test3(a: &u32) -> ARef {
2828
Ref(a)
2929
}
3030

3131
// @has foo/fn.test4.html
32-
// @matches - "Ref</a>&lt;'_&gt;"
32+
// @matchestext - "Ref</a>&lt;'_&gt;"
3333
pub fn test4(a: &u32) -> ARef<'_> {
3434
Ref(a)
3535
}
3636

3737
// Ensure external paths in inlined docs also display elided lifetime
3838
// @has foo/bar/fn.test5.html
39-
// @matches - "Ref</a>&lt;'_&gt;"
39+
// @matchestext - "Ref</a>&lt;'_&gt;"
4040
// @has foo/bar/fn.test6.html
41-
// @matches - "Ref</a>&lt;'_&gt;"
41+
// @matchestext - "Ref</a>&lt;'_&gt;"
4242
#[doc(inline)]
4343
pub extern crate bar;

src/test/rustdoc/empty-mod-private.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
// compile-flags: --document-private-items
22

33
// @has 'empty_mod_private/index.html' '//a[@href="foo/index.html"]' 'foo'
4-
// @has 'empty_mod_private/sidebar-items.js' 'foo'
4+
// @hastext 'empty_mod_private/sidebar-items.js' 'foo'
55
// @matches 'empty_mod_private/foo/index.html' '//h1' 'Module empty_mod_private::foo'
66
mod foo {}
77

88
// @has 'empty_mod_private/index.html' '//a[@href="bar/index.html"]' 'bar'
9-
// @has 'empty_mod_private/sidebar-items.js' 'bar'
9+
// @hastext 'empty_mod_private/sidebar-items.js' 'bar'
1010
// @matches 'empty_mod_private/bar/index.html' '//h1' 'Module empty_mod_private::bar'
1111
mod bar {
1212
// @has 'empty_mod_private/bar/index.html' '//a[@href="baz/index.html"]' 'baz'
13-
// @has 'empty_mod_private/bar/sidebar-items.js' 'baz'
13+
// @hastext 'empty_mod_private/bar/sidebar-items.js' 'baz'
1414
// @matches 'empty_mod_private/bar/baz/index.html' '//h1' 'Module empty_mod_private::bar::baz'
1515
mod baz {}
1616
}

src/test/rustdoc/empty-mod-public.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
// @has 'empty_mod_public/index.html' '//a[@href="foo/index.html"]' 'foo'
2-
// @has 'empty_mod_public/sidebar-items.js' 'foo'
2+
// @hastext 'empty_mod_public/sidebar-items.js' 'foo'
33
// @matches 'empty_mod_public/foo/index.html' '//h1' 'Module empty_mod_public::foo'
44
pub mod foo {}
55

66
// @has 'empty_mod_public/index.html' '//a[@href="bar/index.html"]' 'bar'
7-
// @has 'empty_mod_public/sidebar-items.js' 'bar'
7+
// @hastext 'empty_mod_public/sidebar-items.js' 'bar'
88
// @matches 'empty_mod_public/bar/index.html' '//h1' 'Module empty_mod_public::bar'
99
pub mod bar {
1010
// @has 'empty_mod_public/bar/index.html' '//a[@href="baz/index.html"]' 'baz'
11-
// @has 'empty_mod_public/bar/sidebar-items.js' 'baz'
11+
// @hastext 'empty_mod_public/bar/sidebar-items.js' 'baz'
1212
// @matches 'empty_mod_public/bar/baz/index.html' '//h1' 'Module empty_mod_public::bar::baz'
1313
pub mod baz {}
1414
}

src/test/rustdoc/generic-associated-types/issue-94683.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ pub trait Trait {
88
// Make sure that the elided lifetime shows up
99

1010
// @has foo/type.T.html
11-
// @has - "pub type T = "
12-
// @has - "&lt;'_&gt;"
11+
// @hastext - "pub type T = "
12+
// @hastext - "&lt;'_&gt;"
1313
pub type T = fn(&<() as Trait>::Gat<'_>);

src/test/rustdoc/hide-unstable-trait.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
extern crate unstable_trait;
77

8-
// @has foo/struct.Foo.html 'bar'
9-
// @has foo/struct.Foo.html 'bar2'
8+
// @hastext foo/struct.Foo.html 'bar'
9+
// @hastext foo/struct.Foo.html 'bar2'
1010
#[doc(inline)]
1111
pub use unstable_trait::Foo;

src/test/rustdoc/impl-parts-crosscrate.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ pub struct Bar<T> { t: T }
1212
// full impl string. Instead, just make sure something from each part
1313
// is mentioned.
1414

15-
// @has implementors/rustdoc_impl_parts_crosscrate/trait.AnAutoTrait.js Bar
16-
// @has - Send
17-
// @has - !AnAutoTrait
18-
// @has - Copy
15+
// @hastext implementors/rustdoc_impl_parts_crosscrate/trait.AnAutoTrait.js Bar
16+
// @hastext - Send
17+
// @hastext - !AnAutoTrait
18+
// @hastext - Copy
1919
impl<T: Send> !rustdoc_impl_parts_crosscrate::AnAutoTrait for Bar<T>
2020
where T: Copy {}

src/test/rustdoc/impl-trait-alias.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
trait MyTrait {}
44
impl MyTrait for i32 {}
55

6-
// @has impl_trait_alias/type.Foo.html 'Foo'
6+
// @hastext impl_trait_alias/type.Foo.html 'Foo'
77
/// debug type
88
pub type Foo = impl MyTrait;
99

10-
// @has impl_trait_alias/fn.foo.html 'foo'
10+
// @hastext impl_trait_alias/fn.foo.html 'foo'
1111
/// debug function
1212
pub fn foo() -> Foo {
1313
1

src/test/rustdoc/inline_cross/add-docs.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ extern crate inner;
44

55

66
// @has add_docs/struct.MyStruct.html
7-
// @has add_docs/struct.MyStruct.html "Doc comment from ‘pub use’, Doc comment from definition"
7+
// @hastext add_docs/struct.MyStruct.html "Doc comment from ‘pub use’, Doc comment from definition"
88
/// Doc comment from 'pub use',
99
pub use inner::MyStruct;

src/test/rustdoc/inline_cross/proc_macro.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,25 @@ extern crate some_macros;
1212
// @has proc_macro/derive.SomeDerive.html
1313

1414
// @has proc_macro/macro.some_proc_macro.html
15-
// @has - 'a proc-macro that swallows its input and does nothing.'
15+
// @hastext - 'a proc-macro that swallows its input and does nothing.'
1616
pub use some_macros::some_proc_macro;
1717

1818
// @has proc_macro/macro.reexported_macro.html
19-
// @has - 'Doc comment from the original crate'
19+
// @hastext - 'Doc comment from the original crate'
2020
pub use some_macros::reexported_macro;
2121

2222
// @has proc_macro/attr.some_proc_attr.html
23-
// @has - 'a proc-macro attribute that passes its item through verbatim.'
23+
// @hastext - 'a proc-macro attribute that passes its item through verbatim.'
2424
pub use some_macros::some_proc_attr;
2525

2626
// @has proc_macro/derive.SomeDerive.html
27-
// @has - 'a derive attribute that adds nothing to its input.'
27+
// @hastext - 'a derive attribute that adds nothing to its input.'
2828
pub use some_macros::SomeDerive;
2929

3030
// @has proc_macro/attr.first_attr.html
31-
// @has - 'Generated doc comment'
31+
// @hastext - 'Generated doc comment'
3232
pub use some_macros::first_attr;
3333

3434
// @has proc_macro/attr.second_attr.html
35-
// @has - 'Generated doc comment'
35+
// @hastext - 'Generated doc comment'
3636
pub use some_macros::second_attr;

src/test/rustdoc/inline_local/glob-extern-document-private-items.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ mod mod1 {
1212
pub use mod1::*;
1313

1414
// @has foo/index.html
15-
// @has - "mod1"
16-
// @has - "public_fn"
15+
// @hastext - "mod1"
16+
// @hastext - "public_fn"
1717
// @!has - "private_fn"
1818
// @has foo/fn.public_fn.html
1919
// @!has foo/fn.private_fn.html
2020

2121
// @has foo/mod1/index.html
22-
// @has - "public_fn"
23-
// @has - "private_fn"
22+
// @hastext - "public_fn"
23+
// @hastext - "private_fn"
2424
// @has foo/mod1/fn.public_fn.html
2525
// @has foo/mod1/fn.private_fn.html

src/test/rustdoc/inline_local/glob-extern.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ pub use mod1::*;
1111

1212
// @has foo/index.html
1313
// @!has - "mod1"
14-
// @has - "public_fn"
14+
// @hastext - "public_fn"
1515
// @!has - "private_fn"
1616
// @has foo/fn.public_fn.html
1717
// @!has foo/fn.private_fn.html

src/test/rustdoc/inline_local/glob-private-document-private-items.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,21 @@ mod mod1 {
1515
pub use mod1::*;
1616

1717
// @has foo/index.html
18-
// @has - "mod1"
19-
// @has - "Mod1Public"
18+
// @hastext - "mod1"
19+
// @hastext - "Mod1Public"
2020
// @!has - "Mod1Private"
2121
// @!has - "mod2"
22-
// @has - "Mod2Public"
22+
// @hastext - "Mod2Public"
2323
// @!has - "Mod2Private"
2424
// @has foo/struct.Mod1Public.html
2525
// @!has foo/struct.Mod1Private.html
2626
// @has foo/struct.Mod2Public.html
2727
// @!has foo/struct.Mod2Private.html
2828

2929
// @has foo/mod1/index.html
30-
// @has - "mod2"
31-
// @has - "Mod1Public"
32-
// @has - "Mod1Private"
30+
// @hastext - "mod2"
31+
// @hastext - "Mod1Public"
32+
// @hastext - "Mod1Private"
3333
// @!has - "Mod2Public"
3434
// @!has - "Mod2Private"
3535
// @has foo/mod1/struct.Mod1Public.html
@@ -38,8 +38,8 @@ pub use mod1::*;
3838
// @!has foo/mod1/struct.Mod2Private.html
3939

4040
// @has foo/mod1/mod2/index.html
41-
// @has - "Mod2Public"
42-
// @has - "Mod2Private"
41+
// @hastext - "Mod2Public"
42+
// @hastext - "Mod2Private"
4343
// @has foo/mod1/mod2/struct.Mod2Public.html
4444
// @has foo/mod1/mod2/struct.Mod2Private.html
4545

src/test/rustdoc/inline_local/glob-private.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ pub use mod1::*;
1414

1515
// @has foo/index.html
1616
// @!has - "mod1"
17-
// @has - "Mod1Public"
17+
// @hastext - "Mod1Public"
1818
// @!has - "Mod1Private"
1919
// @!has - "mod2"
20-
// @has - "Mod2Public"
20+
// @hastext - "Mod2Public"
2121
// @!has - "Mod2Private"
2222
// @has foo/struct.Mod1Public.html
2323
// @!has foo/struct.Mod1Private.html

src/test/rustdoc/inline_local/please_inline.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ pub mod a {
1212

1313
// @has please_inline/b/index.html
1414
pub mod b {
15-
// @has - 'pub use foo::'
15+
// @hastext - 'pub use foo::'
1616
// @!has please_inline/b/struct.Foo.html
1717
#[feature(inline)]
1818
pub use foo::Foo;

src/test/rustdoc/intra-doc/extern-type.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ impl G<usize> for ExternType {
2525
}
2626

2727
// @has 'extern_type/foreigntype.ExternType.html'
28-
// @has 'extern_type/fn.links_to_extern_type.html' \
28+
// @hastext 'extern_type/fn.links_to_extern_type.html' \
2929
// 'href="foreigntype.ExternType.html#method.f"'
30-
// @has 'extern_type/fn.links_to_extern_type.html' \
30+
// @hastext 'extern_type/fn.links_to_extern_type.html' \
3131
// 'href="foreigntype.ExternType.html#method.test"'
32-
// @has 'extern_type/fn.links_to_extern_type.html' \
32+
// @hastext 'extern_type/fn.links_to_extern_type.html' \
3333
// 'href="foreigntype.ExternType.html#method.g"'
3434
/// See also [ExternType::f]
3535
/// See also [ExternType::test]

src/test/rustdoc/issue-16265-1.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
pub struct Foo;
22

3-
// @has issue_16265_1/traits/index.html 'source'
3+
// @hastext issue_16265_1/traits/index.html 'source'
44
pub mod traits {
55
impl PartialEq for super::Foo {
66
fn eq(&self, _: &super::Foo) -> bool {

src/test/rustdoc/issue-16265-2.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// @has issue_16265_2/index.html 'source'
1+
// @hastext issue_16265_2/index.html 'source'
22

33
trait Y {}
44
impl Y for Option<u32> {}

src/test/rustdoc/issue-23511.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ pub mod str {
66
#![doc(primitive = "str")]
77

88
impl str {
9-
// @has search-index.js foo
9+
// @hastext search-index.js foo
1010
#[rustc_allow_incoherent_impl]
1111
pub fn foo(&self) {}
1212
}

src/test/rustdoc/issue-23812.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ doc! {
1616
}
1717

1818
// @has issue_23812/Foo/index.html
19-
// @has - 'Outer comment'
19+
// @hastext - 'Outer comment'
2020
// @!has - '/// Outer comment'
21-
// @has - 'Inner comment'
21+
// @hastext - 'Inner comment'
2222
// @!has - '//! Inner comment'
2323

2424

@@ -30,7 +30,7 @@ doc! {
3030
}
3131

3232
// @has issue_23812/Bar/index.html
33-
// @has - 'Outer block comment'
33+
// @hastext - 'Outer block comment'
3434
// @!has - '/** Outer block comment */'
35-
// @has - 'Inner block comment'
35+
// @hastext - 'Inner block comment'
3636
// @!has - '/*! Inner block comment */'

0 commit comments

Comments
 (0)