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

Lines changed: 14 additions & 14 deletions
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

Lines changed: 6 additions & 6 deletions
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

Lines changed: 3 additions & 3 deletions
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

Lines changed: 3 additions & 3 deletions
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 4 additions & 4 deletions
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 6 additions & 6 deletions
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;

0 commit comments

Comments
 (0)