Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup rustdoc tests with @!has and @!matches #54824

Merged
merged 10 commits into from
Oct 26, 2018

Conversation

Munksgaard
Copy link
Contributor

@Munksgaard Munksgaard commented Oct 4, 2018

Fixes #49713

Here's a long list of all the places that include @!has. I have marked the ones I have looked at so far.

  • search-index.rs: fn priv_method() {} // @!has - priv_method
  • search-index.rs: fn trait_method(&self) {} // @!has - priv_method
  • search-index.rs: // @!has search-index.js Target
  • short-dockblock.rs:// @!has foo/index.html '//*[@Class="docblock-short"]/p/h1' 'fooo'
  • short-dockblock.rs:// @!has foo/index.html '//*[@Class="docblock-short"]/p/h2' 'mooood'
  • keyword.rs:// @!has foo/index.html '//a/@href' 'foo/index.html'
  • keyword.rs:// @!has foo/foo/index.html
  • keyword.rs:// @!has-dir foo/foo
  • issue-46380-2.rs:// @!has - '//*[@Class="impl"]' 'impl PublicTrait for PublicStruct'
  • escape-rust-expr.rs:// @!has escape_rust_expr/constant.CONST_S.html '//pre[@Class="rust const"]' '"<script>"'
  • issue-33069.rs:// @!has - '//code' 'impl Bar for Foo'
  • playground-empty.rs:// @!has foo/index.html '//a[@Class="test-arrow"]' "Run"
  • issue-34473.rs:// @!has - SomeTypeWithLongName
  • issue-34473.rs:// @!has - SomeTypeWithLongName
  • issue-34473.rs:// @!has foo/struct.SomeTypeWithLongName.html
  • issue-29584.rs:// @!has - 'impl Bar for'
  • hidden-line.rs:// @!has hidden_line/fn.foo.html invisible
  • manual_impl.rs:// @!has - '//*[@Class="docblock"]' 'Docs associated with the trait a_method definition.'
  • manual_impl.rs:// @!has - '//*[@Class="docblock"]' 'There is another line'
  • manual_impl.rs:// @!has - '//*[@Class="docblock"]' 'Docs associated with the trait a_method definition.'
  • manual_impl.rs:// @!has - '//*[@Class="docblock"]' 'Docs associated with the trait c_method definition.'
  • issue-19190-2.rs:// @!has - '//*[@id="method.new"]' 'fn new() -> String'
  • unneeded-trait-implementations-title.rs:// @!has foo/struct.Bar.html '//*[@id="implementations"]'
  • masked.rs:// @!has 'search-index.js' 'masked_method'
  • masked.rs:// @!has 'foo/struct.String.html' 'MaskedTrait'
  • masked.rs:// @!has 'foo/struct.String.html' 'masked_method'
  • masked.rs:// @!has 'foo/trait.Clone.html' 'MaskedStruct'
  • masked.rs:// @!has 'foo/struct.MyStruct.html' 'MaskedTrait'
  • masked.rs:// @!has 'foo/struct.MyStruct.html' 'masked_method'
  • masked.rs:// @!has 'foo/trait.MyTrait.html' 'MaskedStruct'
  • redirect.rs:// @!has - '//code/a' 'Qux'
  • issue-43701.rs:// @!has implementors/core/clone/trait.Clone.js
  • union.rs: // @!has - //pre "b: u16"
  • prim-title.rs:// @!has - '//head/title' 'foo'
  • empty-section.rs:// @!has - '//*[@Class="synthetic-implementations"]' 'Auto Trait Implementations'
  • traits-in-bodies-private.rs:// @!has - '//code' 'impl HiddenTrait for SomeStruct'
  • playground-none.rs:// @!has foo/index.html '//a[@Class="test-arrow"]' "Run"
  • issue-34025.rs:// @!has 'foo/sys/index.html'
  • issue-34025.rs:// @!has 'foo/sys/sidebar-items.js'
  • issue-34025.rs: // @!has 'foo/sys/fn.foo.html'
  • issue-23812.rs:// @!has - '/// Outer comment'
  • issue-23812.rs:// @!has - '//! Inner comment'
  • issue-23812.rs:// @!has - '/** Outer block comment */'
  • issue-23812.rs:// @!has - '/*! Inner block comment */'
  • pub-use-extern-macros.rs:// @!has pub_use_extern_macros/index.html '//code' 'pub use macros::bar;'
  • pub-use-extern-macros.rs:// @!has pub_use_extern_macros/index.html '//code' 'pub use macros::baz;'
  • pub-use-extern-macros.rs:// @!has pub_use_extern_macros/macro.quux.html
  • pub-use-extern-macros.rs:// @!has pub_use_extern_macros/index.html '//code' 'pub use macros::quux;'
  • issue-26606.rs:// @!has - '//a/@href' '../src/'
  • foreigntype-reexport.rs:// @!has foreigntype_reexport/foreigntype.X4.html
  • foreigntype-reexport.rs:// @!has foreigntype_reexport/index.html '//a[@Class="foreigntype"]' 'X4'
  • issue-31899.rs:// @!has - 'rust rust-example-rendered'
  • issue-31899.rs:// @!has - 'use ndarray::arr2'
  • issue-31899.rs:// @!has - 'prohibited'
  • hidden-trait-struct-impls.rs:// @!has foo/struct.Bar.html '//*[@id="impl-Foo"]' 'impl Foo for Bar'
  • hidden-trait-struct-impls.rs:// @!has foo/struct.Bar.html '//*[@id="impl-Dark"]' 'impl Dark for Bar'
  • hidden-trait-struct-impls.rs:// @!has foo/trait.Bam.html '//*[@id="implementors-list"]' 'impl Bam for Hidden'
  • hidden-impls.rs:// @!has - 'Foo'
  • hidden-impls.rs:// @!has - 'Foo'
  • module-impls.rs:// @!has foo/index.html 'Implementations'
  • issue-35169.rs:// @!has - '//*[@id="by_mut_ref.v"]' 'fn by_mut_ref(&mut self)'
  • issue-35169.rs:// @!has - '//*[@id="method.by_mut_ref"]' 'fn by_mut_ref(&mut self)'
  • issue-35169.rs:// @!has - '//*[@id="by_explicit_mut_ref.v"]' 'fn by_explicit_mut_ref(self: &mut Foo)'
  • issue-35169.rs:// @!has - '//*[@id="method.by_explicit_mut_ref"]' 'fn by_explicit_mut_ref(self: &mut Foo)'
  • issue-35169.rs:// @!has - '//*[@id="by_explicit_box.v"]' 'fn by_explicit_box(self: Box)'
  • issue-35169.rs:// @!has - '//*[@id="method.by_explicit_box"]' 'fn by_explicit_box(self: Box)'
  • issue-35169.rs:// @!has - '//*[@id="by_explicit_self_box.v"]' 'fn by_explicit_self_box(self: Box)'
  • issue-35169.rs:// @!has - '//*[@id="method.by_explicit_self_box"]' 'fn by_explicit_self_box(self: Box)'
  • issue-35169.rs:// @!has - '//*[@id="static_foo.v"]' 'fn static_foo()'
  • issue-35169.rs:// @!has - '//*[@id="method.static_foo"]' 'fn static_foo()'
  • extern-links.rs:// @!has foo/index.html '//a' 'extern_links'
  • extern-links.rs:// @!has foo/index.html '//a' 'Foo'
  • extern-links.rs: // @!has foo/hidden/extern_links/index.html
  • extern-links.rs: // @!has foo/hidden/extern_links/struct.Foo.html
  • issue-33178-1.rs:// @!has - //a/@title empty
  • issue-33178-1.rs:// @!has - //a/@title variant_struct
  • issue-47038.rs:// @!has - '//*[@id="macros"]' 'Macros'
  • issue-47038.rs:// @!has - '//a/@href' 'macro.vec.html'
  • issue-47038.rs:// @!has 'foo/macro.vec.html'
  • issue-46766.rs:// @!has foo/index.html '//a/@href' './Enum/index.html'
  • issue-32395.rs:// @!has - 'pub qux'
  • issue-32395.rs:// @!has - 'pub Bar'
  • issue-32395.rs:// @!has - 'pub qux'
  • issue-32395.rs:// @!has - 'pub Bar'
  • hidden-methods.rs:// @!has - 'Methods'
  • hidden-methods.rs:// @!has - 'impl Foo'
  • hidden-methods.rs:// @!has - 'this_should_be_hidden'
  • hidden-methods.rs:// @!has - 'Methods'
  • hidden-methods.rs:// @!has - 'impl Bar'
  • hidden-methods.rs:// @!has - 'this_should_be_hidden'
  • structfields.rs: // @!has - //pre "b: ()"
  • structfields.rs: // @!has - //pre "c: usize"
  • structfields.rs: // @!has - //pre "// some fields omitted"
  • structfields.rs: // @!has - //pre "b: ()"
  • issue-46767.rs:// @!has foo/index.html '//a/@href' './private/index.html'
  • assoc-consts.rs: // @!has - FOO_HIDDEN
  • assoc-consts.rs: // @!has - FOO_HIDDEN
  • assoc-consts.rs: // @!has assoc_consts/struct.Bar.html 'BAR_PRIVATE'
  • assoc-consts.rs: // @!has assoc_consts/struct.Bar.html 'BAR_HIDDEN'
  • issue-53689.rs:// @!has - 'MyStruct'
  • search-index-summaries.rs:// @!has - 'www.example.com'
  • search-index-summaries.rs:// @!has - 'More Foo.'
  • impl-everywhere.rs:// @!has foo/fn.foo.html '//section[@id="main"]//pre' "x: &'x impl Foo"
  • impl-everywhere.rs:// @!has foo/fn.foo.html '//section[@id="main"]//pre' "-> &'x impl Foo {"
  • impl-everywhere.rs:// @!has foo/fn.foo2.html '//section[@id="main"]//pre' "x: &'x impl Foo"
  • impl-everywhere.rs:// @!has foo/fn.foo2.html '//section[@id="main"]//pre' '-> impl Foo2 {'
  • impl-everywhere.rs:// @!has foo/fn.foo_foo.html '//section[@id="main"]//pre' '-> impl Foo + Foo2 {'
  • impl-everywhere.rs:// @!has foo/fn.foo2.html '//section[@id="main"]//pre' "x: &'x (impl Foo + Foo2)"
  • issue-19190.rs:// @!has - '//*[@id="static_foo.v"]' 'fn static_foo()'
  • issue-19190.rs:// @!has - '//*[@id="method.static_foo"]' 'fn static_foo()'
  • deprecated-impls.rs: // @!has - 'fn_def_def_with_doc full'
  • deprecated-impls.rs: // @!has - 'fn_empty_with_doc full'
  • deprecated-impls.rs: // @!has - 'fn_def_with full'
  • deprecated-impls.rs: // @!has - 'fn_def_def_with_doc full'
  • issue-19190-3.rs:// @!has - '//*[@id="method.new"]' 'fn new() -> String'
  • issue-19190-3.rs:// @!has - '//*[@id="method.static_baz"]' 'fn static_baz()'
  • issue-19190-3.rs:// @!has - '//*[@id="method.static_baz"]' 'fn static_baz()'
  • sidebar-items.rs:// @!has - '//*[@Class="sidebar-links"]/a' 'waza'
  • sidebar-items.rs:// @!has - '//*[@Class="sidebar-links"]/a' 'waza'
  • issue-27104.rs:// @!has - 'extern crate std'
  • issue-27104.rs:// @!has - 'use std::prelude::'
  • issue-13698.rs:// @!has issue_13698/struct.Foo.html '//*[@id="method.foo"]' 'fn foo'
  • issue-13698.rs:// @!has issue_13698/struct.Foo.html '//*[@id="method.foo"]' 'fn bar'
  • issue-41783.rs:// @!has - 'space'
  • issue-41783.rs:// @!has - 'comment'
  • trait-self-link.rs:// @!has trait_self_link/trait.Foo.html //a/@href ../trait_self_link/trait.Foo.html
  • generic-impl.rs:// @!has foo/struct.Bar.html '//h3[@id="impl-ToString"]//code' 'impl ToString for T'
  • all.rs:// @!has foo/all.html 'private_module'
  • issue-35169-2.rs:// @!has - '//*[@id="by_explicit_box.v"]' 'fn by_explicit_box(self: Box)'
  • issue-35169-2.rs:// @!has - '//*[@id="method.by_explicit_box"]' 'fn by_explicit_box(self: Box)'
  • issue-35169-2.rs:// @!has - '//*[@id="by_explicit_self_box.v"]' 'fn by_explicit_self_box(self: Box)'
  • issue-35169-2.rs:// @!has - '//*[@id="method.by_explicit_self_box"]' 'fn by_explicit_self_box(self: Box)'
  • issue-35169-2.rs:// @!has - '//*[@id="static_foo.v"]' 'fn static_foo()'
  • issue-35169-2.rs:// @!has - '//*[@id="method.static_foo"]' 'fn static_foo()'
  • doc-cfg.rs:// @!has - '//[@id="main"]/[@Class="stability"]/*[@Class="stab portability"]' ''
  • inline_local/glob-private.rs:// @!has - "mod1"
  • inline_local/glob-private.rs:// @!has - "Mod1Private"
  • inline_local/glob-private.rs:// @!has - "mod2"
  • inline_local/glob-private.rs:// @!has - "Mod2Private"
  • inline_local/glob-private.rs:// @!has foo/struct.Mod1Private.html
  • inline_local/glob-private.rs:// @!has foo/struct.Mod2Private.html
  • inline_local/glob-private.rs:// @!has foo/mod1/index.html
  • inline_local/glob-private.rs:// @!has foo/mod1/struct.Mod1Private.html
  • inline_local/glob-private.rs:// @!has foo/mod1/struct.Mod2Public.html
  • inline_local/glob-private.rs:// @!has foo/mod1/struct.Mod2Private.html
  • inline_local/glob-private.rs:// @!has foo/mod1/mod2/index.html
  • inline_local/glob-private.rs:// @!has foo/mod1/mod2/struct.Mod2Private.html
  • inline_local/glob-private.rs:// @!has-dir foo/mod2
  • inline_local/glob-private.rs:// @!has foo/mod2/index.html
  • inline_local/glob-private.rs:// @!has foo/mod2/struct.Mod2Public.html
  • inline_local/glob-private.rs:// @!has foo/mod2/struct.Mod2Private.html
  • inline_local/hidden-use.rs:// @!has - 'private'
  • inline_local/hidden-use.rs:// @!has - 'Foo'
  • inline_local/hidden-use.rs:// @!has hidden_use/struct.Foo.html
  • inline_local/glob-extern-no-defaults.rs:// @!has - "private_fn"
  • inline_local/glob-extern-no-defaults.rs:// @!has foo/fn.private_fn.html
  • inline_local/issue-32343.rs:// @!has issue_32343/struct.Foo.html
  • inline_local/issue-32343.rs:// @!has - '//code/a' 'Foo'
  • inline_local/issue-32343.rs:// @!has issue_32343/struct.Bar.html
  • inline_local/glob-private-no-defaults.rs:// @!has - "Mod1Private"
  • inline_local/glob-private-no-defaults.rs:// @!has - "mod2"
  • inline_local/glob-private-no-defaults.rs:// @!has - "Mod2Private"
  • inline_local/glob-private-no-defaults.rs:// @!has foo/struct.Mod1Private.html
  • inline_local/glob-private-no-defaults.rs:// @!has foo/struct.Mod2Private.html
  • inline_local/glob-private-no-defaults.rs:// @!has - "Mod2Public"
  • inline_local/glob-private-no-defaults.rs:// @!has - "Mod2Private"
  • inline_local/glob-private-no-defaults.rs:// @!has foo/mod1/struct.Mod2Public.html
  • inline_local/glob-private-no-defaults.rs:// @!has foo/mod1/struct.Mod2Private.html
  • inline_local/glob-private-no-defaults.rs:// @!has foo/mod2/index.html
  • inline_local/glob-private-no-defaults.rs:// @!has foo/mod2/struct.Mod2Public.html
  • inline_local/glob-private-no-defaults.rs:// @!has foo/mod2/struct.Mod2Private.html
  • inline_local/glob-extern.rs:// @!has - "mod1"
  • inline_local/glob-extern.rs:// @!has - "private_fn"
  • inline_local/glob-extern.rs:// @!has foo/fn.private_fn.html
  • inline_local/glob-extern.rs:// @!has foo/mod1/index.html
  • inline_local/glob-extern.rs:// @!has foo/mod1/fn.private_fn.html
  • inline_local/please_inline.rs: // @!has - 'pub use foo::'
  • inline_local/please_inline.rs: // @!has please_inline/b/struct.Foo.html
  • inline_cross/hidden-use.rs:// @!has - 'rustdoc_hidden'
  • inline_cross/hidden-use.rs:// @!has - 'Bar'
  • inline_cross/hidden-use.rs:// @!has hidden_use/struct.Bar.html
  • inline_cross/inline_hidden.rs:// @!has - '//a/@title' 'Foo'
  • inline_cross/assoc-items.rs:// @!has - 'PrivateConst'
  • inline_cross/assoc-items.rs:// @!has - 'private_method'
  • inline_cross/cross-glob.rs:// @!has cross_glob/index.html '//code' 'pub use inner::*;'
  • inline_cross/macro-vis.rs:// @!has - '//pre' 'some_macro'
  • inline_cross/macro-vis.rs:// @!has macro_vis/macro.other_macro.html
  • inline_cross/macro-vis.rs:// @!has macro_vis/index.html '//a/@href' 'macro.other_macro.html'
  • inline_cross/macro-vis.rs:// @!has - '//code' 'pub use qwop::other_macro;'
  • inline_cross/macro-vis.rs:// @!has macro_vis/macro.super_macro.html
  • inline_cross/issue-31948.rs:// @!has - '//*[@Class="impl"]//code' 'Bar for'
  • inline_cross/issue-31948.rs:// @!has - '//*[@Class="impl"]//code' 'Qux for'
  • inline_cross/issue-31948.rs:// @!has - '//code' 'for Wibble'
  • inline_cross/issue-31948.rs:// @!has - '//code' 'for Wobble'
  • inline_cross/issue-31948.rs:// @!has - '//code' 'for Wibble'
  • inline_cross/issue-31948.rs:// @!has - '//code' 'for Wobble'
  • inline_cross/issue-31948.rs:// @!has issue_31948/trait.Bar.html
  • inline_cross/issue-31948.rs:// @!has issue_31948/trait.Qux.html
  • inline_cross/issue-31948.rs:// @!has issue_31948/struct.Wibble.html
  • inline_cross/issue-31948.rs:// @!has issue_31948/struct.Wobble.html
  • inline_cross/issue-31948-1.rs:// @!has - '//*[@Class="impl"]//code' 'Bar for'
  • inline_cross/issue-31948-1.rs:// @!has - '//*[@Class="impl"]//code' 'Qux for'
  • inline_cross/issue-31948-1.rs:// @!has - '//code' 'for Wibble'
  • inline_cross/issue-31948-1.rs:// @!has - '//code' 'for Wibble'
  • inline_cross/issue-31948-1.rs:// @!has issue_31948_1/trait.Bar.html
  • inline_cross/issue-31948-1.rs:// @!has issue_31948_1/trait.Qux.html
  • inline_cross/issue-28480.rs:// @!has - '//a/@title' 'Hidden'
  • inline_cross/issue-28480.rs:// @!has - '//a/@title' 'Hidden'
  • inline_cross/issue-31948-2.rs:// @!has - '//*[@Class="impl"]//code' 'Bar for'
  • inline_cross/issue-31948-2.rs:// @!has issue_31948_2/trait.Bar.html
  • inline_cross/issue-31948-2.rs:// @!has issue_31948_2/trait.Woof.html
  • inline_cross/issue-31948-2.rs:// @!has issue_31948_2/trait.Bark.html

It doesn't look like @!matches is used anywhere.

The old test was supposed to check for proper html escaping when showing the
contents of constants. This was changed as part of rust-lang#53409. The revised test
asserts that the contents of the constant is not shown as part of the generated
documentation.
"Run" links to the playground are not added to the generated documentation if
the unstable `--playground-url` argument is not passed to rustdoc. Therefore,
without specifying `--playground-url` as a compile-flag, the test doesn't
correctly assert that `#![doc(html_playground_url = "")]` removes playground
links.
@rust-highfive
Copy link
Collaborator

r? @alexcrichton

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 4, 2018
@Munksgaard
Copy link
Contributor Author

r? @QuietMisdreavus

The `@!has` command does not support specifying just a PATH and an XPATH. That
means that the previous test searched for the literal string
`//h2[@id="implementations"]` within the generated output, which obviously
didn't exist. Even after adding a trait implementation, the test still passed.
The correct way to check for the existence of a DOM element with the id
`implementations` is to use the `@count` keyword.
Struct names are no longer encapsulated in `<code>` tags, which meant that the
test was not correctly verifying that it wasn't being show. I've also added a
check to make sure the documentation page for the redirect::Qux struct is not
generated at all.
@Munksgaard
Copy link
Contributor Author

issue-43701.rs:// @!has implementors/core/clone/trait.Clone.js

@QuietMisdreavus: I'm not quite sure how to verify this test. What would I change in order to invalidate the test as it is? In other words, is there a way to make rustdoc generate the referred implementors/core/clone/trait.Clone.js file?

The Auto Trait Implementation section is not wrapped in a
`synthetic-implementations` class. In fact, it is wrapped in a
`synthetic-implementations` id. However, we can generalize and completely remove
the `synthetic-implementations` requirement. We just have to verify that there's
no mention of "Auto Trait Implementations" anywhere.
@Munksgaard
Copy link
Contributor Author

  • module-impls.rs:// @!has foo/index.html 'Implementations'

I'm not sure if this test actually has any meaningful purpose. Is there ever an "Implementations" section in index.html?

@QuietMisdreavus
Copy link
Member

For issue-43701.rs, the implementors JS file will appear if a local type implements that trait. Adding something like:

#[derive(Clone)]
pub struct SomeStruct;

should make the test fail.

It looks like module-impls.rs is a regression test. It looks like before #34536, the "default impls" of auto traits like Send/Sync would generate bogus "Implementations" sections in their modules. You can see the example if you look at the archive of the 1.10.0 docs. We're not supposed to add "Implementations" sections to modules, and this is checking that.

@Munksgaard
Copy link
Contributor Author

Thanks for clearing that up for me. I'm planning on getting a bit further with this tonight.

The generated code would look like `<code>impl <a href="...">Foo</a></code>`
which the plain text matcher doesn't match. But by using the XPATH notation, the
nodes are flattened and we can correctly assert that `impl Foo` does not occur
in the generated docs.
The link that is matched against is not the same as would be generated by
rustdoc. We should also check that the `foo/private` directory is not generated
at all.
@Munksgaard
Copy link
Contributor Author

Munksgaard commented Oct 10, 2018

[ ] impl-everywhere.rs:// @!has foo/fn.foo.html '//section[@id="main"]//pre' "x: &\'x impl Foo"

This test looks strange. The generated documentation looks like this (wrapped in pre):

pub fn foo<'x>(
    x: &'x impl Foo
) -> &'x impl Foo

so it seems like the backslash in the test is taken literally which means that it doesn't match. Is that on purpose? @GuillaumeGomez it seems like you created the test, so perhaps you can enlighten me?

Edit: To be clear, removing the backslash from the test causes the test to fail.

The function is called `fn_def_with_doc`, not `fn_def_with`.
@Munksgaard
Copy link
Contributor Author

Incidentally, a9217e3 fixes some of the issues in #44366

@Munksgaard
Copy link
Contributor Author

[ ] impl-everywhere.rs:// @!has foo/fn.foo.html '//section[@id="main"]//pre' "x: &\'x impl Foo"

This test looks strange. The generated documentation looks like this (wrapped in pre):

pub fn foo<'x>(
    x: &'x impl Foo
) -> &'x impl Foo

so it seems like the backslash in the test is taken literally which means that it doesn't match. Is that on purpose? @GuillaumeGomez it seems like you created the test, so perhaps you can enlighten me?

Edit: To be clear, removing the backslash from the test causes the test to fail.

@GuillaumeGomez Did you have any time to look at this?

@GuillaumeGomez
Copy link
Member

I just read it today. Open an issue and assign it to me. I'll take a look later.

@Munksgaard
Copy link
Contributor Author

I just read it today. Open an issue and assign it to me. I'll take a look later.

I don't think I can assign people to issues, but I've created the issue (#55201).

With that done, I think this PR is ready to be merged. @QuietMisdreavus is there anything else you'd like me to do?

@GuillaumeGomez
Copy link
Member

Great, looks good to me! 👍

@QuietMisdreavus
Copy link
Member

This looks good, thanks so much for going through all of these!

I have two requests, just for the PR metadata:

  1. Can you remove "WIP" from the title of the PR? Bors doesn't like it when we try to approve PR's marked with WIP.
  2. Can you change the first line of the PR description to just "Fixes double-check rustdoc tests to ensure @!has and @!matches are expected #49713" so that GitHub will automatically close that issue when this is merged?

r=me once that's done.

@Munksgaard Munksgaard changed the title [WIP] Cleanup rustdoc tests with @!has and @!matches Cleanup rustdoc tests with @!has and @!matches Oct 25, 2018
@Munksgaard
Copy link
Contributor Author

r=@QuietMisdreavus

@Munksgaard
Copy link
Contributor Author

?r @QuietMisdreavus

@Munksgaard
Copy link
Contributor Author

I don't know how that works 😅

@GuillaumeGomez
Copy link
Member

Like this:

@bors: r=QuietMisdreavus

@bors
Copy link
Contributor

bors commented Oct 25, 2018

📌 Commit a9217e3 has been approved by QuietMisdreavus

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 25, 2018
@Munksgaard
Copy link
Contributor Author

Thank you :-)

pietroalbini added a commit to pietroalbini/rust that referenced this pull request Oct 25, 2018
…avus

Cleanup rustdoc tests with `@!has` and `@!matches`

Fixes rust-lang#49713

Here's a _long_ list of all the places that include `@!has`. I have marked the ones I have looked at so far.

 - [x] search-index.rs:        fn priv_method() {} // @!has - priv_method
 - [x] search-index.rs:        fn trait_method(&self) {} // @!has - priv_method
 - [x] search-index.rs:    // @!has search-index.js Target
 - [x] short-dockblock.rs:// @!has foo/index.html '//*[@Class="docblock-short"]/p/h1' 'fooo'
 - [x] short-dockblock.rs:// @!has foo/index.html '//*[@Class="docblock-short"]/p/h2' 'mooood'
 - [x] keyword.rs:// @!has foo/index.html '//a/@href' 'foo/index.html'
 - [x] keyword.rs:// @!has foo/foo/index.html
 - [x] keyword.rs:// @!has-dir foo/foo
 - [x] issue-46380-2.rs:// @!has - '//*[@Class="impl"]' 'impl PublicTrait<PrivateStruct> for PublicStruct'
 - [x] escape-rust-expr.rs:// @!has escape_rust_expr/constant.CONST_S.html '//pre[@Class="rust const"]' '"<script>"'
 - [x] issue-33069.rs:// @!has - '//code' 'impl Bar for Foo'
 - [x] playground-empty.rs:// @!has foo/index.html '//a[@Class="test-arrow"]' "Run"
 - [x] issue-34473.rs:// @!has - SomeTypeWithLongName
 - [x] issue-34473.rs:// @!has - SomeTypeWithLongName
 - [x] issue-34473.rs:// @!has foo/struct.SomeTypeWithLongName.html
 - [x] issue-29584.rs:// @!has - 'impl Bar for'
 - [x] hidden-line.rs:// @!has hidden_line/fn.foo.html invisible
 - [x] manual_impl.rs:// @!has - '//*[@Class="docblock"]' 'Docs associated with the trait a_method definition.'
 - [x] manual_impl.rs:// @!has - '//*[@Class="docblock"]' 'There is another line'
 - [x] manual_impl.rs:// @!has - '//*[@Class="docblock"]' 'Docs associated with the trait a_method definition.'
 - [x] manual_impl.rs:// @!has - '//*[@Class="docblock"]' 'Docs associated with the trait c_method definition.'
 - [x] issue-19190-2.rs:// @!has - '//*[@id="method.new"]' 'fn new() -> String'
 - [x] unneeded-trait-implementations-title.rs:// @!has foo/struct.Bar.html '//*[@id="implementations"]'
 - [x] masked.rs:// @!has 'search-index.js' 'masked_method'
 - [x] masked.rs:// @!has 'foo/struct.String.html' 'MaskedTrait'
 - [x] masked.rs:// @!has 'foo/struct.String.html' 'masked_method'
 - [x] masked.rs:// @!has 'foo/trait.Clone.html' 'MaskedStruct'
 - [x] masked.rs:// @!has 'foo/struct.MyStruct.html' 'MaskedTrait'
 - [x] masked.rs:// @!has 'foo/struct.MyStruct.html' 'masked_method'
 - [x] masked.rs:// @!has 'foo/trait.MyTrait.html' 'MaskedStruct'
 - [x] redirect.rs:// @!has - '//code/a' 'Qux'
 - [x] issue-43701.rs:// @!has implementors/core/clone/trait.Clone.js
 - [x] union.rs:    // @!has - //pre "b: u16"
 - [x] prim-title.rs:// @!has - '//head/title' 'foo'
 - [x] empty-section.rs:// @!has - '//*[@Class="synthetic-implementations"]' 'Auto Trait Implementations'
 - [x] traits-in-bodies-private.rs:// @!has - '//code' 'impl HiddenTrait for SomeStruct'
 - [x] playground-none.rs:// @!has foo/index.html '//a[@Class="test-arrow"]' "Run"
 - [x] issue-34025.rs:// @!has 'foo/sys/index.html'
 - [x] issue-34025.rs:// @!has 'foo/sys/sidebar-items.js'
 - [x] issue-34025.rs:        // @!has 'foo/sys/fn.foo.html'
 - [x] issue-23812.rs:// @!has - '/// Outer comment'
 - [x] issue-23812.rs:// @!has - '//! Inner comment'
 - [x] issue-23812.rs:// @!has - '/** Outer block comment */'
 - [x] issue-23812.rs:// @!has - '/*! Inner block comment */'
 - [x] pub-use-extern-macros.rs:// @!has pub_use_extern_macros/index.html '//code' 'pub use macros::bar;'
 - [x] pub-use-extern-macros.rs:// @!has pub_use_extern_macros/index.html '//code' 'pub use macros::baz;'
 - [x] pub-use-extern-macros.rs:// @!has pub_use_extern_macros/macro.quux.html
 - [x] pub-use-extern-macros.rs:// @!has pub_use_extern_macros/index.html '//code' 'pub use macros::quux;'
 - [x] issue-26606.rs:// @!has - '//a/@href' '../src/'
 - [x] foreigntype-reexport.rs:// @!has foreigntype_reexport/foreigntype.X4.html
 - [x] foreigntype-reexport.rs:// @!has foreigntype_reexport/index.html '//a[@Class="foreigntype"]' 'X4'
 - [x] issue-31899.rs:// @!has - 'rust rust-example-rendered'
 - [x] issue-31899.rs:// @!has - 'use ndarray::arr2'
 - [x] issue-31899.rs:// @!has - 'prohibited'
 - [x] hidden-trait-struct-impls.rs:// @!has foo/struct.Bar.html '//*[@id="impl-Foo"]' 'impl Foo for Bar'
 - [x] hidden-trait-struct-impls.rs:// @!has foo/struct.Bar.html '//*[@id="impl-Dark"]' 'impl Dark for Bar'
 - [x] hidden-trait-struct-impls.rs:// @!has foo/trait.Bam.html '//*[@id="implementors-list"]' 'impl Bam for Hidden'
 - [x] hidden-impls.rs:// @!has - 'Foo'
 - [x] hidden-impls.rs:// @!has - 'Foo'
 - [x] module-impls.rs:// @!has foo/index.html 'Implementations'
 - [x] issue-35169.rs:// @!has - '//*[@id="by_mut_ref.v"]' 'fn by_mut_ref(&mut self)'
 - [x] issue-35169.rs:// @!has - '//*[@id="method.by_mut_ref"]' 'fn by_mut_ref(&mut self)'
 - [x] issue-35169.rs:// @!has - '//*[@id="by_explicit_mut_ref.v"]' 'fn by_explicit_mut_ref(self: &mut Foo)'
 - [x] issue-35169.rs:// @!has - '//*[@id="method.by_explicit_mut_ref"]' 'fn by_explicit_mut_ref(self: &mut Foo)'
 - [x] issue-35169.rs:// @!has - '//*[@id="by_explicit_box.v"]' 'fn by_explicit_box(self: Box<Foo>)'
 - [x] issue-35169.rs:// @!has - '//*[@id="method.by_explicit_box"]' 'fn by_explicit_box(self: Box<Foo>)'
 - [x] issue-35169.rs:// @!has - '//*[@id="by_explicit_self_box.v"]' 'fn by_explicit_self_box(self: Box<Self>)'
 - [x] issue-35169.rs:// @!has - '//*[@id="method.by_explicit_self_box"]' 'fn by_explicit_self_box(self: Box<Self>)'
 - [x] issue-35169.rs:// @!has - '//*[@id="static_foo.v"]' 'fn static_foo()'
 - [x] issue-35169.rs:// @!has - '//*[@id="method.static_foo"]' 'fn static_foo()'
 - [x] extern-links.rs:// @!has foo/index.html '//a' 'extern_links'
 - [x] extern-links.rs:// @!has foo/index.html '//a' 'Foo'
 - [x] extern-links.rs:    // @!has foo/hidden/extern_links/index.html
 - [x] extern-links.rs:    // @!has foo/hidden/extern_links/struct.Foo.html
 - [x] issue-33178-1.rs:// @!has - //a/@title empty
 - [x] issue-33178-1.rs:// @!has - //a/@title variant_struct
 - [x] issue-47038.rs:// @!has - '//*[@id="macros"]' 'Macros'
 - [x] issue-47038.rs:// @!has - '//a/@href' 'macro.vec.html'
 - [x] issue-47038.rs:// @!has 'foo/macro.vec.html'
 - [x] issue-46766.rs:// @!has foo/index.html '//a/@href' './Enum/index.html'
 - [x] issue-32395.rs:// @!has - 'pub qux'
 - [x] issue-32395.rs:// @!has - 'pub Bar'
 - [x] issue-32395.rs:// @!has - 'pub qux'
 - [x] issue-32395.rs:// @!has - 'pub Bar'
 - [x] hidden-methods.rs:// @!has - 'Methods'
 - [x] hidden-methods.rs:// @!has - 'impl Foo'
 - [x] hidden-methods.rs:// @!has - 'this_should_be_hidden'
 - [x] hidden-methods.rs:// @!has - 'Methods'
 - [x] hidden-methods.rs:// @!has - 'impl Bar'
 - [x] hidden-methods.rs:// @!has - 'this_should_be_hidden'
 - [x] structfields.rs:    // @!has - //pre "b: ()"
 - [x] structfields.rs:    // @!has - //pre "c: usize"
 - [x] structfields.rs:    // @!has - //pre "// some fields omitted"
 - [x] structfields.rs:        // @!has - //pre "b: ()"
 - [x] issue-46767.rs:// @!has foo/index.html '//a/@href' './private/index.html'
 - [x] assoc-consts.rs:    // @!has - FOO_HIDDEN
 - [x] assoc-consts.rs:    // @!has - FOO_HIDDEN
 - [x] assoc-consts.rs:    // @!has assoc_consts/struct.Bar.html 'BAR_PRIVATE'
 - [x] assoc-consts.rs:    // @!has assoc_consts/struct.Bar.html 'BAR_HIDDEN'
 - [x] issue-53689.rs:// @!has - 'MyStruct'
 - [x] search-index-summaries.rs:// @!has - 'www.example.com'
 - [x] search-index-summaries.rs:// @!has - 'More Foo.'
 - [x] impl-everywhere.rs:// @!has foo/fn.foo.html '//section[@id="main"]//pre' "x: &\'x impl Foo"
 - [x] impl-everywhere.rs:// @!has foo/fn.foo.html '//section[@id="main"]//pre' "-> &\'x impl Foo {"
 - [x] impl-everywhere.rs:// @!has foo/fn.foo2.html '//section[@id="main"]//pre' "x: &\'x impl Foo"
 - [x] impl-everywhere.rs:// @!has foo/fn.foo2.html '//section[@id="main"]//pre' '-> impl Foo2 {'
 - [x] impl-everywhere.rs:// @!has foo/fn.foo_foo.html '//section[@id="main"]//pre' '-> impl Foo + Foo2 {'
 - [x] impl-everywhere.rs:// @!has foo/fn.foo2.html '//section[@id="main"]//pre' "x: &'x (impl Foo + Foo2)"
 - [x] issue-19190.rs:// @!has - '//*[@id="static_foo.v"]' 'fn static_foo()'
 - [x] issue-19190.rs:// @!has - '//*[@id="method.static_foo"]' 'fn static_foo()'
 - [x] deprecated-impls.rs:    // @!has - 'fn_def_def_with_doc full'
 - [x] deprecated-impls.rs:    // @!has - 'fn_empty_with_doc full'
 - [x] deprecated-impls.rs:    // @!has - 'fn_def_with full'
 - [x] deprecated-impls.rs:    // @!has - 'fn_def_def_with_doc full'
 - [x] issue-19190-3.rs:// @!has - '//*[@id="method.new"]' 'fn new() -> String'
 - [x] issue-19190-3.rs:// @!has - '//*[@id="method.static_baz"]' 'fn static_baz()'
 - [x] issue-19190-3.rs:// @!has - '//*[@id="method.static_baz"]' 'fn static_baz()'
 - [x] sidebar-items.rs:// @!has - '//*[@Class="sidebar-links"]/a' 'waza'
 - [x] sidebar-items.rs:// @!has - '//*[@Class="sidebar-links"]/a' 'waza'
 - [x] issue-27104.rs:// @!has - 'extern crate std'
 - [x] issue-27104.rs:// @!has - 'use std::prelude::'
 - [x] issue-13698.rs:// @!has issue_13698/struct.Foo.html '//*[@id="method.foo"]' 'fn foo'
 - [x] issue-13698.rs:// @!has issue_13698/struct.Foo.html '//*[@id="method.foo"]' 'fn bar'
 - [x] issue-41783.rs:// @!has - 'space'
 - [x] issue-41783.rs:// @!has - 'comment'
 - [x] trait-self-link.rs:// @!has trait_self_link/trait.Foo.html //a/@href ../trait_self_link/trait.Foo.html
 - [x] generic-impl.rs:// @!has foo/struct.Bar.html '//h3[@id="impl-ToString"]//code' 'impl<T> ToString for T'
 - [x] all.rs:// @!has foo/all.html 'private_module'
 - [x] issue-35169-2.rs:// @!has - '//*[@id="by_explicit_box.v"]' 'fn by_explicit_box(self: Box<Foo>)'
 - [x] issue-35169-2.rs:// @!has - '//*[@id="method.by_explicit_box"]' 'fn by_explicit_box(self: Box<Foo>)'
 - [x] issue-35169-2.rs:// @!has - '//*[@id="by_explicit_self_box.v"]' 'fn by_explicit_self_box(self: Box<Self>)'
 - [x] issue-35169-2.rs:// @!has - '//*[@id="method.by_explicit_self_box"]' 'fn by_explicit_self_box(self: Box<Self>)'
 - [x] issue-35169-2.rs:// @!has - '//*[@id="static_foo.v"]' 'fn static_foo()'
 - [x] issue-35169-2.rs:// @!has - '//*[@id="method.static_foo"]' 'fn static_foo()'
 - [x] doc-cfg.rs:// @!has - '//*[@id="main"]/*[@Class="stability"]/*[@Class="stab portability"]' ''
 - [x] inline_local/glob-private.rs:// @!has - "mod1"
 - [x] inline_local/glob-private.rs:// @!has - "Mod1Private"
 - [x] inline_local/glob-private.rs:// @!has - "mod2"
 - [x] inline_local/glob-private.rs:// @!has - "Mod2Private"
 - [x] inline_local/glob-private.rs:// @!has foo/struct.Mod1Private.html
 - [x] inline_local/glob-private.rs:// @!has foo/struct.Mod2Private.html
 - [x] inline_local/glob-private.rs:// @!has foo/mod1/index.html
 - [x] inline_local/glob-private.rs:// @!has foo/mod1/struct.Mod1Private.html
 - [x] inline_local/glob-private.rs:// @!has foo/mod1/struct.Mod2Public.html
 - [x] inline_local/glob-private.rs:// @!has foo/mod1/struct.Mod2Private.html
 - [x] inline_local/glob-private.rs:// @!has foo/mod1/mod2/index.html
 - [x] inline_local/glob-private.rs:// @!has foo/mod1/mod2/struct.Mod2Private.html
 - [x] inline_local/glob-private.rs:// @!has-dir foo/mod2
 - [x] inline_local/glob-private.rs:// @!has foo/mod2/index.html
 - [x] inline_local/glob-private.rs:// @!has foo/mod2/struct.Mod2Public.html
 - [x] inline_local/glob-private.rs:// @!has foo/mod2/struct.Mod2Private.html
 - [x] inline_local/hidden-use.rs:// @!has - 'private'
 - [x] inline_local/hidden-use.rs:// @!has - 'Foo'
 - [x] inline_local/hidden-use.rs:// @!has hidden_use/struct.Foo.html
 - [x] inline_local/glob-extern-no-defaults.rs:// @!has - "private_fn"
 - [x] inline_local/glob-extern-no-defaults.rs:// @!has foo/fn.private_fn.html
 - [x] inline_local/issue-32343.rs:// @!has issue_32343/struct.Foo.html
 - [x] inline_local/issue-32343.rs:// @!has - '//code/a' 'Foo'
 - [x] inline_local/issue-32343.rs:// @!has issue_32343/struct.Bar.html
 - [x] inline_local/glob-private-no-defaults.rs:// @!has - "Mod1Private"
 - [x] inline_local/glob-private-no-defaults.rs:// @!has - "mod2"
 - [x] inline_local/glob-private-no-defaults.rs:// @!has - "Mod2Private"
 - [x] inline_local/glob-private-no-defaults.rs:// @!has foo/struct.Mod1Private.html
 - [x] inline_local/glob-private-no-defaults.rs:// @!has foo/struct.Mod2Private.html
 - [x] inline_local/glob-private-no-defaults.rs:// @!has - "Mod2Public"
 - [x] inline_local/glob-private-no-defaults.rs:// @!has - "Mod2Private"
 - [x] inline_local/glob-private-no-defaults.rs:// @!has foo/mod1/struct.Mod2Public.html
 - [x] inline_local/glob-private-no-defaults.rs:// @!has foo/mod1/struct.Mod2Private.html
 - [x] inline_local/glob-private-no-defaults.rs:// @!has foo/mod2/index.html
 - [x] inline_local/glob-private-no-defaults.rs:// @!has foo/mod2/struct.Mod2Public.html
 - [x] inline_local/glob-private-no-defaults.rs:// @!has foo/mod2/struct.Mod2Private.html
 - [x] inline_local/glob-extern.rs:// @!has - "mod1"
 - [x] inline_local/glob-extern.rs:// @!has - "private_fn"
 - [x] inline_local/glob-extern.rs:// @!has foo/fn.private_fn.html
 - [x] inline_local/glob-extern.rs:// @!has foo/mod1/index.html
 - [x] inline_local/glob-extern.rs:// @!has foo/mod1/fn.private_fn.html
 - [x] inline_local/please_inline.rs:    // @!has - 'pub use foo::'
 - [x] inline_local/please_inline.rs:    // @!has please_inline/b/struct.Foo.html
 - [x] inline_cross/hidden-use.rs:// @!has - 'rustdoc_hidden'
 - [x] inline_cross/hidden-use.rs:// @!has - 'Bar'
 - [x] inline_cross/hidden-use.rs:// @!has hidden_use/struct.Bar.html
 - [x] inline_cross/inline_hidden.rs:// @!has - '//a/@title' 'Foo'
 - [x] inline_cross/assoc-items.rs:// @!has - 'PrivateConst'
 - [x] inline_cross/assoc-items.rs:// @!has - 'private_method'
 - [x] inline_cross/cross-glob.rs:// @!has cross_glob/index.html '//code' 'pub use inner::*;'
 - [x] inline_cross/macro-vis.rs:// @!has - '//pre' 'some_macro'
 - [x] inline_cross/macro-vis.rs:// @!has macro_vis/macro.other_macro.html
 - [x] inline_cross/macro-vis.rs:// @!has macro_vis/index.html '//a/@href' 'macro.other_macro.html'
 - [x] inline_cross/macro-vis.rs:// @!has - '//code' 'pub use qwop::other_macro;'
 - [x] inline_cross/macro-vis.rs:// @!has macro_vis/macro.super_macro.html
 - [x] inline_cross/issue-31948.rs:// @!has - '//*[@Class="impl"]//code' 'Bar for'
 - [x] inline_cross/issue-31948.rs:// @!has - '//*[@Class="impl"]//code' 'Qux for'
 - [x] inline_cross/issue-31948.rs:// @!has - '//code' 'for Wibble'
 - [x] inline_cross/issue-31948.rs:// @!has - '//code' 'for Wobble'
 - [x] inline_cross/issue-31948.rs:// @!has - '//code' 'for Wibble'
 - [x] inline_cross/issue-31948.rs:// @!has - '//code' 'for Wobble'
 - [x] inline_cross/issue-31948.rs:// @!has issue_31948/trait.Bar.html
 - [x] inline_cross/issue-31948.rs:// @!has issue_31948/trait.Qux.html
 - [x] inline_cross/issue-31948.rs:// @!has issue_31948/struct.Wibble.html
 - [x] inline_cross/issue-31948.rs:// @!has issue_31948/struct.Wobble.html
 - [x] inline_cross/issue-31948-1.rs:// @!has - '//*[@Class="impl"]//code' 'Bar for'
 - [x] inline_cross/issue-31948-1.rs:// @!has - '//*[@Class="impl"]//code' 'Qux for'
 - [x] inline_cross/issue-31948-1.rs:// @!has - '//code' 'for Wibble'
 - [x] inline_cross/issue-31948-1.rs:// @!has - '//code' 'for Wibble'
 - [x] inline_cross/issue-31948-1.rs:// @!has issue_31948_1/trait.Bar.html
 - [x] inline_cross/issue-31948-1.rs:// @!has issue_31948_1/trait.Qux.html
 - [x] inline_cross/issue-28480.rs:// @!has -  '//a/@title' 'Hidden'
 - [x] inline_cross/issue-28480.rs:// @!has -  '//a/@title' 'Hidden'
 - [x] inline_cross/issue-31948-2.rs:// @!has - '//*[@Class="impl"]//code' 'Bar for'
 - [x] inline_cross/issue-31948-2.rs:// @!has issue_31948_2/trait.Bar.html
 - [x] inline_cross/issue-31948-2.rs:// @!has issue_31948_2/trait.Woof.html
 - [x] inline_cross/issue-31948-2.rs:// @!has issue_31948_2/trait.Bark.html

It doesn't look like `@!matches` is used anywhere.
kennytm added a commit to kennytm/rust that referenced this pull request Oct 26, 2018
…avus

Cleanup rustdoc tests with `@!has` and `@!matches`

Fixes rust-lang#49713

Here's a _long_ list of all the places that include `@!has`. I have marked the ones I have looked at so far.

 - [x] search-index.rs:        fn priv_method() {} // @!has - priv_method
 - [x] search-index.rs:        fn trait_method(&self) {} // @!has - priv_method
 - [x] search-index.rs:    // @!has search-index.js Target
 - [x] short-dockblock.rs:// @!has foo/index.html '//*[@Class="docblock-short"]/p/h1' 'fooo'
 - [x] short-dockblock.rs:// @!has foo/index.html '//*[@Class="docblock-short"]/p/h2' 'mooood'
 - [x] keyword.rs:// @!has foo/index.html '//a/@href' 'foo/index.html'
 - [x] keyword.rs:// @!has foo/foo/index.html
 - [x] keyword.rs:// @!has-dir foo/foo
 - [x] issue-46380-2.rs:// @!has - '//*[@Class="impl"]' 'impl PublicTrait<PrivateStruct> for PublicStruct'
 - [x] escape-rust-expr.rs:// @!has escape_rust_expr/constant.CONST_S.html '//pre[@Class="rust const"]' '"<script>"'
 - [x] issue-33069.rs:// @!has - '//code' 'impl Bar for Foo'
 - [x] playground-empty.rs:// @!has foo/index.html '//a[@Class="test-arrow"]' "Run"
 - [x] issue-34473.rs:// @!has - SomeTypeWithLongName
 - [x] issue-34473.rs:// @!has - SomeTypeWithLongName
 - [x] issue-34473.rs:// @!has foo/struct.SomeTypeWithLongName.html
 - [x] issue-29584.rs:// @!has - 'impl Bar for'
 - [x] hidden-line.rs:// @!has hidden_line/fn.foo.html invisible
 - [x] manual_impl.rs:// @!has - '//*[@Class="docblock"]' 'Docs associated with the trait a_method definition.'
 - [x] manual_impl.rs:// @!has - '//*[@Class="docblock"]' 'There is another line'
 - [x] manual_impl.rs:// @!has - '//*[@Class="docblock"]' 'Docs associated with the trait a_method definition.'
 - [x] manual_impl.rs:// @!has - '//*[@Class="docblock"]' 'Docs associated with the trait c_method definition.'
 - [x] issue-19190-2.rs:// @!has - '//*[@id="method.new"]' 'fn new() -> String'
 - [x] unneeded-trait-implementations-title.rs:// @!has foo/struct.Bar.html '//*[@id="implementations"]'
 - [x] masked.rs:// @!has 'search-index.js' 'masked_method'
 - [x] masked.rs:// @!has 'foo/struct.String.html' 'MaskedTrait'
 - [x] masked.rs:// @!has 'foo/struct.String.html' 'masked_method'
 - [x] masked.rs:// @!has 'foo/trait.Clone.html' 'MaskedStruct'
 - [x] masked.rs:// @!has 'foo/struct.MyStruct.html' 'MaskedTrait'
 - [x] masked.rs:// @!has 'foo/struct.MyStruct.html' 'masked_method'
 - [x] masked.rs:// @!has 'foo/trait.MyTrait.html' 'MaskedStruct'
 - [x] redirect.rs:// @!has - '//code/a' 'Qux'
 - [x] issue-43701.rs:// @!has implementors/core/clone/trait.Clone.js
 - [x] union.rs:    // @!has - //pre "b: u16"
 - [x] prim-title.rs:// @!has - '//head/title' 'foo'
 - [x] empty-section.rs:// @!has - '//*[@Class="synthetic-implementations"]' 'Auto Trait Implementations'
 - [x] traits-in-bodies-private.rs:// @!has - '//code' 'impl HiddenTrait for SomeStruct'
 - [x] playground-none.rs:// @!has foo/index.html '//a[@Class="test-arrow"]' "Run"
 - [x] issue-34025.rs:// @!has 'foo/sys/index.html'
 - [x] issue-34025.rs:// @!has 'foo/sys/sidebar-items.js'
 - [x] issue-34025.rs:        // @!has 'foo/sys/fn.foo.html'
 - [x] issue-23812.rs:// @!has - '/// Outer comment'
 - [x] issue-23812.rs:// @!has - '//! Inner comment'
 - [x] issue-23812.rs:// @!has - '/** Outer block comment */'
 - [x] issue-23812.rs:// @!has - '/*! Inner block comment */'
 - [x] pub-use-extern-macros.rs:// @!has pub_use_extern_macros/index.html '//code' 'pub use macros::bar;'
 - [x] pub-use-extern-macros.rs:// @!has pub_use_extern_macros/index.html '//code' 'pub use macros::baz;'
 - [x] pub-use-extern-macros.rs:// @!has pub_use_extern_macros/macro.quux.html
 - [x] pub-use-extern-macros.rs:// @!has pub_use_extern_macros/index.html '//code' 'pub use macros::quux;'
 - [x] issue-26606.rs:// @!has - '//a/@href' '../src/'
 - [x] foreigntype-reexport.rs:// @!has foreigntype_reexport/foreigntype.X4.html
 - [x] foreigntype-reexport.rs:// @!has foreigntype_reexport/index.html '//a[@Class="foreigntype"]' 'X4'
 - [x] issue-31899.rs:// @!has - 'rust rust-example-rendered'
 - [x] issue-31899.rs:// @!has - 'use ndarray::arr2'
 - [x] issue-31899.rs:// @!has - 'prohibited'
 - [x] hidden-trait-struct-impls.rs:// @!has foo/struct.Bar.html '//*[@id="impl-Foo"]' 'impl Foo for Bar'
 - [x] hidden-trait-struct-impls.rs:// @!has foo/struct.Bar.html '//*[@id="impl-Dark"]' 'impl Dark for Bar'
 - [x] hidden-trait-struct-impls.rs:// @!has foo/trait.Bam.html '//*[@id="implementors-list"]' 'impl Bam for Hidden'
 - [x] hidden-impls.rs:// @!has - 'Foo'
 - [x] hidden-impls.rs:// @!has - 'Foo'
 - [x] module-impls.rs:// @!has foo/index.html 'Implementations'
 - [x] issue-35169.rs:// @!has - '//*[@id="by_mut_ref.v"]' 'fn by_mut_ref(&mut self)'
 - [x] issue-35169.rs:// @!has - '//*[@id="method.by_mut_ref"]' 'fn by_mut_ref(&mut self)'
 - [x] issue-35169.rs:// @!has - '//*[@id="by_explicit_mut_ref.v"]' 'fn by_explicit_mut_ref(self: &mut Foo)'
 - [x] issue-35169.rs:// @!has - '//*[@id="method.by_explicit_mut_ref"]' 'fn by_explicit_mut_ref(self: &mut Foo)'
 - [x] issue-35169.rs:// @!has - '//*[@id="by_explicit_box.v"]' 'fn by_explicit_box(self: Box<Foo>)'
 - [x] issue-35169.rs:// @!has - '//*[@id="method.by_explicit_box"]' 'fn by_explicit_box(self: Box<Foo>)'
 - [x] issue-35169.rs:// @!has - '//*[@id="by_explicit_self_box.v"]' 'fn by_explicit_self_box(self: Box<Self>)'
 - [x] issue-35169.rs:// @!has - '//*[@id="method.by_explicit_self_box"]' 'fn by_explicit_self_box(self: Box<Self>)'
 - [x] issue-35169.rs:// @!has - '//*[@id="static_foo.v"]' 'fn static_foo()'
 - [x] issue-35169.rs:// @!has - '//*[@id="method.static_foo"]' 'fn static_foo()'
 - [x] extern-links.rs:// @!has foo/index.html '//a' 'extern_links'
 - [x] extern-links.rs:// @!has foo/index.html '//a' 'Foo'
 - [x] extern-links.rs:    // @!has foo/hidden/extern_links/index.html
 - [x] extern-links.rs:    // @!has foo/hidden/extern_links/struct.Foo.html
 - [x] issue-33178-1.rs:// @!has - //a/@title empty
 - [x] issue-33178-1.rs:// @!has - //a/@title variant_struct
 - [x] issue-47038.rs:// @!has - '//*[@id="macros"]' 'Macros'
 - [x] issue-47038.rs:// @!has - '//a/@href' 'macro.vec.html'
 - [x] issue-47038.rs:// @!has 'foo/macro.vec.html'
 - [x] issue-46766.rs:// @!has foo/index.html '//a/@href' './Enum/index.html'
 - [x] issue-32395.rs:// @!has - 'pub qux'
 - [x] issue-32395.rs:// @!has - 'pub Bar'
 - [x] issue-32395.rs:// @!has - 'pub qux'
 - [x] issue-32395.rs:// @!has - 'pub Bar'
 - [x] hidden-methods.rs:// @!has - 'Methods'
 - [x] hidden-methods.rs:// @!has - 'impl Foo'
 - [x] hidden-methods.rs:// @!has - 'this_should_be_hidden'
 - [x] hidden-methods.rs:// @!has - 'Methods'
 - [x] hidden-methods.rs:// @!has - 'impl Bar'
 - [x] hidden-methods.rs:// @!has - 'this_should_be_hidden'
 - [x] structfields.rs:    // @!has - //pre "b: ()"
 - [x] structfields.rs:    // @!has - //pre "c: usize"
 - [x] structfields.rs:    // @!has - //pre "// some fields omitted"
 - [x] structfields.rs:        // @!has - //pre "b: ()"
 - [x] issue-46767.rs:// @!has foo/index.html '//a/@href' './private/index.html'
 - [x] assoc-consts.rs:    // @!has - FOO_HIDDEN
 - [x] assoc-consts.rs:    // @!has - FOO_HIDDEN
 - [x] assoc-consts.rs:    // @!has assoc_consts/struct.Bar.html 'BAR_PRIVATE'
 - [x] assoc-consts.rs:    // @!has assoc_consts/struct.Bar.html 'BAR_HIDDEN'
 - [x] issue-53689.rs:// @!has - 'MyStruct'
 - [x] search-index-summaries.rs:// @!has - 'www.example.com'
 - [x] search-index-summaries.rs:// @!has - 'More Foo.'
 - [x] impl-everywhere.rs:// @!has foo/fn.foo.html '//section[@id="main"]//pre' "x: &\'x impl Foo"
 - [x] impl-everywhere.rs:// @!has foo/fn.foo.html '//section[@id="main"]//pre' "-> &\'x impl Foo {"
 - [x] impl-everywhere.rs:// @!has foo/fn.foo2.html '//section[@id="main"]//pre' "x: &\'x impl Foo"
 - [x] impl-everywhere.rs:// @!has foo/fn.foo2.html '//section[@id="main"]//pre' '-> impl Foo2 {'
 - [x] impl-everywhere.rs:// @!has foo/fn.foo_foo.html '//section[@id="main"]//pre' '-> impl Foo + Foo2 {'
 - [x] impl-everywhere.rs:// @!has foo/fn.foo2.html '//section[@id="main"]//pre' "x: &'x (impl Foo + Foo2)"
 - [x] issue-19190.rs:// @!has - '//*[@id="static_foo.v"]' 'fn static_foo()'
 - [x] issue-19190.rs:// @!has - '//*[@id="method.static_foo"]' 'fn static_foo()'
 - [x] deprecated-impls.rs:    // @!has - 'fn_def_def_with_doc full'
 - [x] deprecated-impls.rs:    // @!has - 'fn_empty_with_doc full'
 - [x] deprecated-impls.rs:    // @!has - 'fn_def_with full'
 - [x] deprecated-impls.rs:    // @!has - 'fn_def_def_with_doc full'
 - [x] issue-19190-3.rs:// @!has - '//*[@id="method.new"]' 'fn new() -> String'
 - [x] issue-19190-3.rs:// @!has - '//*[@id="method.static_baz"]' 'fn static_baz()'
 - [x] issue-19190-3.rs:// @!has - '//*[@id="method.static_baz"]' 'fn static_baz()'
 - [x] sidebar-items.rs:// @!has - '//*[@Class="sidebar-links"]/a' 'waza'
 - [x] sidebar-items.rs:// @!has - '//*[@Class="sidebar-links"]/a' 'waza'
 - [x] issue-27104.rs:// @!has - 'extern crate std'
 - [x] issue-27104.rs:// @!has - 'use std::prelude::'
 - [x] issue-13698.rs:// @!has issue_13698/struct.Foo.html '//*[@id="method.foo"]' 'fn foo'
 - [x] issue-13698.rs:// @!has issue_13698/struct.Foo.html '//*[@id="method.foo"]' 'fn bar'
 - [x] issue-41783.rs:// @!has - 'space'
 - [x] issue-41783.rs:// @!has - 'comment'
 - [x] trait-self-link.rs:// @!has trait_self_link/trait.Foo.html //a/@href ../trait_self_link/trait.Foo.html
 - [x] generic-impl.rs:// @!has foo/struct.Bar.html '//h3[@id="impl-ToString"]//code' 'impl<T> ToString for T'
 - [x] all.rs:// @!has foo/all.html 'private_module'
 - [x] issue-35169-2.rs:// @!has - '//*[@id="by_explicit_box.v"]' 'fn by_explicit_box(self: Box<Foo>)'
 - [x] issue-35169-2.rs:// @!has - '//*[@id="method.by_explicit_box"]' 'fn by_explicit_box(self: Box<Foo>)'
 - [x] issue-35169-2.rs:// @!has - '//*[@id="by_explicit_self_box.v"]' 'fn by_explicit_self_box(self: Box<Self>)'
 - [x] issue-35169-2.rs:// @!has - '//*[@id="method.by_explicit_self_box"]' 'fn by_explicit_self_box(self: Box<Self>)'
 - [x] issue-35169-2.rs:// @!has - '//*[@id="static_foo.v"]' 'fn static_foo()'
 - [x] issue-35169-2.rs:// @!has - '//*[@id="method.static_foo"]' 'fn static_foo()'
 - [x] doc-cfg.rs:// @!has - '//*[@id="main"]/*[@Class="stability"]/*[@Class="stab portability"]' ''
 - [x] inline_local/glob-private.rs:// @!has - "mod1"
 - [x] inline_local/glob-private.rs:// @!has - "Mod1Private"
 - [x] inline_local/glob-private.rs:// @!has - "mod2"
 - [x] inline_local/glob-private.rs:// @!has - "Mod2Private"
 - [x] inline_local/glob-private.rs:// @!has foo/struct.Mod1Private.html
 - [x] inline_local/glob-private.rs:// @!has foo/struct.Mod2Private.html
 - [x] inline_local/glob-private.rs:// @!has foo/mod1/index.html
 - [x] inline_local/glob-private.rs:// @!has foo/mod1/struct.Mod1Private.html
 - [x] inline_local/glob-private.rs:// @!has foo/mod1/struct.Mod2Public.html
 - [x] inline_local/glob-private.rs:// @!has foo/mod1/struct.Mod2Private.html
 - [x] inline_local/glob-private.rs:// @!has foo/mod1/mod2/index.html
 - [x] inline_local/glob-private.rs:// @!has foo/mod1/mod2/struct.Mod2Private.html
 - [x] inline_local/glob-private.rs:// @!has-dir foo/mod2
 - [x] inline_local/glob-private.rs:// @!has foo/mod2/index.html
 - [x] inline_local/glob-private.rs:// @!has foo/mod2/struct.Mod2Public.html
 - [x] inline_local/glob-private.rs:// @!has foo/mod2/struct.Mod2Private.html
 - [x] inline_local/hidden-use.rs:// @!has - 'private'
 - [x] inline_local/hidden-use.rs:// @!has - 'Foo'
 - [x] inline_local/hidden-use.rs:// @!has hidden_use/struct.Foo.html
 - [x] inline_local/glob-extern-no-defaults.rs:// @!has - "private_fn"
 - [x] inline_local/glob-extern-no-defaults.rs:// @!has foo/fn.private_fn.html
 - [x] inline_local/issue-32343.rs:// @!has issue_32343/struct.Foo.html
 - [x] inline_local/issue-32343.rs:// @!has - '//code/a' 'Foo'
 - [x] inline_local/issue-32343.rs:// @!has issue_32343/struct.Bar.html
 - [x] inline_local/glob-private-no-defaults.rs:// @!has - "Mod1Private"
 - [x] inline_local/glob-private-no-defaults.rs:// @!has - "mod2"
 - [x] inline_local/glob-private-no-defaults.rs:// @!has - "Mod2Private"
 - [x] inline_local/glob-private-no-defaults.rs:// @!has foo/struct.Mod1Private.html
 - [x] inline_local/glob-private-no-defaults.rs:// @!has foo/struct.Mod2Private.html
 - [x] inline_local/glob-private-no-defaults.rs:// @!has - "Mod2Public"
 - [x] inline_local/glob-private-no-defaults.rs:// @!has - "Mod2Private"
 - [x] inline_local/glob-private-no-defaults.rs:// @!has foo/mod1/struct.Mod2Public.html
 - [x] inline_local/glob-private-no-defaults.rs:// @!has foo/mod1/struct.Mod2Private.html
 - [x] inline_local/glob-private-no-defaults.rs:// @!has foo/mod2/index.html
 - [x] inline_local/glob-private-no-defaults.rs:// @!has foo/mod2/struct.Mod2Public.html
 - [x] inline_local/glob-private-no-defaults.rs:// @!has foo/mod2/struct.Mod2Private.html
 - [x] inline_local/glob-extern.rs:// @!has - "mod1"
 - [x] inline_local/glob-extern.rs:// @!has - "private_fn"
 - [x] inline_local/glob-extern.rs:// @!has foo/fn.private_fn.html
 - [x] inline_local/glob-extern.rs:// @!has foo/mod1/index.html
 - [x] inline_local/glob-extern.rs:// @!has foo/mod1/fn.private_fn.html
 - [x] inline_local/please_inline.rs:    // @!has - 'pub use foo::'
 - [x] inline_local/please_inline.rs:    // @!has please_inline/b/struct.Foo.html
 - [x] inline_cross/hidden-use.rs:// @!has - 'rustdoc_hidden'
 - [x] inline_cross/hidden-use.rs:// @!has - 'Bar'
 - [x] inline_cross/hidden-use.rs:// @!has hidden_use/struct.Bar.html
 - [x] inline_cross/inline_hidden.rs:// @!has - '//a/@title' 'Foo'
 - [x] inline_cross/assoc-items.rs:// @!has - 'PrivateConst'
 - [x] inline_cross/assoc-items.rs:// @!has - 'private_method'
 - [x] inline_cross/cross-glob.rs:// @!has cross_glob/index.html '//code' 'pub use inner::*;'
 - [x] inline_cross/macro-vis.rs:// @!has - '//pre' 'some_macro'
 - [x] inline_cross/macro-vis.rs:// @!has macro_vis/macro.other_macro.html
 - [x] inline_cross/macro-vis.rs:// @!has macro_vis/index.html '//a/@href' 'macro.other_macro.html'
 - [x] inline_cross/macro-vis.rs:// @!has - '//code' 'pub use qwop::other_macro;'
 - [x] inline_cross/macro-vis.rs:// @!has macro_vis/macro.super_macro.html
 - [x] inline_cross/issue-31948.rs:// @!has - '//*[@Class="impl"]//code' 'Bar for'
 - [x] inline_cross/issue-31948.rs:// @!has - '//*[@Class="impl"]//code' 'Qux for'
 - [x] inline_cross/issue-31948.rs:// @!has - '//code' 'for Wibble'
 - [x] inline_cross/issue-31948.rs:// @!has - '//code' 'for Wobble'
 - [x] inline_cross/issue-31948.rs:// @!has - '//code' 'for Wibble'
 - [x] inline_cross/issue-31948.rs:// @!has - '//code' 'for Wobble'
 - [x] inline_cross/issue-31948.rs:// @!has issue_31948/trait.Bar.html
 - [x] inline_cross/issue-31948.rs:// @!has issue_31948/trait.Qux.html
 - [x] inline_cross/issue-31948.rs:// @!has issue_31948/struct.Wibble.html
 - [x] inline_cross/issue-31948.rs:// @!has issue_31948/struct.Wobble.html
 - [x] inline_cross/issue-31948-1.rs:// @!has - '//*[@Class="impl"]//code' 'Bar for'
 - [x] inline_cross/issue-31948-1.rs:// @!has - '//*[@Class="impl"]//code' 'Qux for'
 - [x] inline_cross/issue-31948-1.rs:// @!has - '//code' 'for Wibble'
 - [x] inline_cross/issue-31948-1.rs:// @!has - '//code' 'for Wibble'
 - [x] inline_cross/issue-31948-1.rs:// @!has issue_31948_1/trait.Bar.html
 - [x] inline_cross/issue-31948-1.rs:// @!has issue_31948_1/trait.Qux.html
 - [x] inline_cross/issue-28480.rs:// @!has -  '//a/@title' 'Hidden'
 - [x] inline_cross/issue-28480.rs:// @!has -  '//a/@title' 'Hidden'
 - [x] inline_cross/issue-31948-2.rs:// @!has - '//*[@Class="impl"]//code' 'Bar for'
 - [x] inline_cross/issue-31948-2.rs:// @!has issue_31948_2/trait.Bar.html
 - [x] inline_cross/issue-31948-2.rs:// @!has issue_31948_2/trait.Woof.html
 - [x] inline_cross/issue-31948-2.rs:// @!has issue_31948_2/trait.Bark.html

It doesn't look like `@!matches` is used anywhere.
kennytm added a commit to kennytm/rust that referenced this pull request Oct 26, 2018
…avus

Cleanup rustdoc tests with `@!has` and `@!matches`

Fixes rust-lang#49713

Here's a _long_ list of all the places that include `@!has`. I have marked the ones I have looked at so far.

 - [x] search-index.rs:        fn priv_method() {} // @!has - priv_method
 - [x] search-index.rs:        fn trait_method(&self) {} // @!has - priv_method
 - [x] search-index.rs:    // @!has search-index.js Target
 - [x] short-dockblock.rs:// @!has foo/index.html '//*[@Class="docblock-short"]/p/h1' 'fooo'
 - [x] short-dockblock.rs:// @!has foo/index.html '//*[@Class="docblock-short"]/p/h2' 'mooood'
 - [x] keyword.rs:// @!has foo/index.html '//a/@href' 'foo/index.html'
 - [x] keyword.rs:// @!has foo/foo/index.html
 - [x] keyword.rs:// @!has-dir foo/foo
 - [x] issue-46380-2.rs:// @!has - '//*[@Class="impl"]' 'impl PublicTrait<PrivateStruct> for PublicStruct'
 - [x] escape-rust-expr.rs:// @!has escape_rust_expr/constant.CONST_S.html '//pre[@Class="rust const"]' '"<script>"'
 - [x] issue-33069.rs:// @!has - '//code' 'impl Bar for Foo'
 - [x] playground-empty.rs:// @!has foo/index.html '//a[@Class="test-arrow"]' "Run"
 - [x] issue-34473.rs:// @!has - SomeTypeWithLongName
 - [x] issue-34473.rs:// @!has - SomeTypeWithLongName
 - [x] issue-34473.rs:// @!has foo/struct.SomeTypeWithLongName.html
 - [x] issue-29584.rs:// @!has - 'impl Bar for'
 - [x] hidden-line.rs:// @!has hidden_line/fn.foo.html invisible
 - [x] manual_impl.rs:// @!has - '//*[@Class="docblock"]' 'Docs associated with the trait a_method definition.'
 - [x] manual_impl.rs:// @!has - '//*[@Class="docblock"]' 'There is another line'
 - [x] manual_impl.rs:// @!has - '//*[@Class="docblock"]' 'Docs associated with the trait a_method definition.'
 - [x] manual_impl.rs:// @!has - '//*[@Class="docblock"]' 'Docs associated with the trait c_method definition.'
 - [x] issue-19190-2.rs:// @!has - '//*[@id="method.new"]' 'fn new() -> String'
 - [x] unneeded-trait-implementations-title.rs:// @!has foo/struct.Bar.html '//*[@id="implementations"]'
 - [x] masked.rs:// @!has 'search-index.js' 'masked_method'
 - [x] masked.rs:// @!has 'foo/struct.String.html' 'MaskedTrait'
 - [x] masked.rs:// @!has 'foo/struct.String.html' 'masked_method'
 - [x] masked.rs:// @!has 'foo/trait.Clone.html' 'MaskedStruct'
 - [x] masked.rs:// @!has 'foo/struct.MyStruct.html' 'MaskedTrait'
 - [x] masked.rs:// @!has 'foo/struct.MyStruct.html' 'masked_method'
 - [x] masked.rs:// @!has 'foo/trait.MyTrait.html' 'MaskedStruct'
 - [x] redirect.rs:// @!has - '//code/a' 'Qux'
 - [x] issue-43701.rs:// @!has implementors/core/clone/trait.Clone.js
 - [x] union.rs:    // @!has - //pre "b: u16"
 - [x] prim-title.rs:// @!has - '//head/title' 'foo'
 - [x] empty-section.rs:// @!has - '//*[@Class="synthetic-implementations"]' 'Auto Trait Implementations'
 - [x] traits-in-bodies-private.rs:// @!has - '//code' 'impl HiddenTrait for SomeStruct'
 - [x] playground-none.rs:// @!has foo/index.html '//a[@Class="test-arrow"]' "Run"
 - [x] issue-34025.rs:// @!has 'foo/sys/index.html'
 - [x] issue-34025.rs:// @!has 'foo/sys/sidebar-items.js'
 - [x] issue-34025.rs:        // @!has 'foo/sys/fn.foo.html'
 - [x] issue-23812.rs:// @!has - '/// Outer comment'
 - [x] issue-23812.rs:// @!has - '//! Inner comment'
 - [x] issue-23812.rs:// @!has - '/** Outer block comment */'
 - [x] issue-23812.rs:// @!has - '/*! Inner block comment */'
 - [x] pub-use-extern-macros.rs:// @!has pub_use_extern_macros/index.html '//code' 'pub use macros::bar;'
 - [x] pub-use-extern-macros.rs:// @!has pub_use_extern_macros/index.html '//code' 'pub use macros::baz;'
 - [x] pub-use-extern-macros.rs:// @!has pub_use_extern_macros/macro.quux.html
 - [x] pub-use-extern-macros.rs:// @!has pub_use_extern_macros/index.html '//code' 'pub use macros::quux;'
 - [x] issue-26606.rs:// @!has - '//a/@href' '../src/'
 - [x] foreigntype-reexport.rs:// @!has foreigntype_reexport/foreigntype.X4.html
 - [x] foreigntype-reexport.rs:// @!has foreigntype_reexport/index.html '//a[@Class="foreigntype"]' 'X4'
 - [x] issue-31899.rs:// @!has - 'rust rust-example-rendered'
 - [x] issue-31899.rs:// @!has - 'use ndarray::arr2'
 - [x] issue-31899.rs:// @!has - 'prohibited'
 - [x] hidden-trait-struct-impls.rs:// @!has foo/struct.Bar.html '//*[@id="impl-Foo"]' 'impl Foo for Bar'
 - [x] hidden-trait-struct-impls.rs:// @!has foo/struct.Bar.html '//*[@id="impl-Dark"]' 'impl Dark for Bar'
 - [x] hidden-trait-struct-impls.rs:// @!has foo/trait.Bam.html '//*[@id="implementors-list"]' 'impl Bam for Hidden'
 - [x] hidden-impls.rs:// @!has - 'Foo'
 - [x] hidden-impls.rs:// @!has - 'Foo'
 - [x] module-impls.rs:// @!has foo/index.html 'Implementations'
 - [x] issue-35169.rs:// @!has - '//*[@id="by_mut_ref.v"]' 'fn by_mut_ref(&mut self)'
 - [x] issue-35169.rs:// @!has - '//*[@id="method.by_mut_ref"]' 'fn by_mut_ref(&mut self)'
 - [x] issue-35169.rs:// @!has - '//*[@id="by_explicit_mut_ref.v"]' 'fn by_explicit_mut_ref(self: &mut Foo)'
 - [x] issue-35169.rs:// @!has - '//*[@id="method.by_explicit_mut_ref"]' 'fn by_explicit_mut_ref(self: &mut Foo)'
 - [x] issue-35169.rs:// @!has - '//*[@id="by_explicit_box.v"]' 'fn by_explicit_box(self: Box<Foo>)'
 - [x] issue-35169.rs:// @!has - '//*[@id="method.by_explicit_box"]' 'fn by_explicit_box(self: Box<Foo>)'
 - [x] issue-35169.rs:// @!has - '//*[@id="by_explicit_self_box.v"]' 'fn by_explicit_self_box(self: Box<Self>)'
 - [x] issue-35169.rs:// @!has - '//*[@id="method.by_explicit_self_box"]' 'fn by_explicit_self_box(self: Box<Self>)'
 - [x] issue-35169.rs:// @!has - '//*[@id="static_foo.v"]' 'fn static_foo()'
 - [x] issue-35169.rs:// @!has - '//*[@id="method.static_foo"]' 'fn static_foo()'
 - [x] extern-links.rs:// @!has foo/index.html '//a' 'extern_links'
 - [x] extern-links.rs:// @!has foo/index.html '//a' 'Foo'
 - [x] extern-links.rs:    // @!has foo/hidden/extern_links/index.html
 - [x] extern-links.rs:    // @!has foo/hidden/extern_links/struct.Foo.html
 - [x] issue-33178-1.rs:// @!has - //a/@title empty
 - [x] issue-33178-1.rs:// @!has - //a/@title variant_struct
 - [x] issue-47038.rs:// @!has - '//*[@id="macros"]' 'Macros'
 - [x] issue-47038.rs:// @!has - '//a/@href' 'macro.vec.html'
 - [x] issue-47038.rs:// @!has 'foo/macro.vec.html'
 - [x] issue-46766.rs:// @!has foo/index.html '//a/@href' './Enum/index.html'
 - [x] issue-32395.rs:// @!has - 'pub qux'
 - [x] issue-32395.rs:// @!has - 'pub Bar'
 - [x] issue-32395.rs:// @!has - 'pub qux'
 - [x] issue-32395.rs:// @!has - 'pub Bar'
 - [x] hidden-methods.rs:// @!has - 'Methods'
 - [x] hidden-methods.rs:// @!has - 'impl Foo'
 - [x] hidden-methods.rs:// @!has - 'this_should_be_hidden'
 - [x] hidden-methods.rs:// @!has - 'Methods'
 - [x] hidden-methods.rs:// @!has - 'impl Bar'
 - [x] hidden-methods.rs:// @!has - 'this_should_be_hidden'
 - [x] structfields.rs:    // @!has - //pre "b: ()"
 - [x] structfields.rs:    // @!has - //pre "c: usize"
 - [x] structfields.rs:    // @!has - //pre "// some fields omitted"
 - [x] structfields.rs:        // @!has - //pre "b: ()"
 - [x] issue-46767.rs:// @!has foo/index.html '//a/@href' './private/index.html'
 - [x] assoc-consts.rs:    // @!has - FOO_HIDDEN
 - [x] assoc-consts.rs:    // @!has - FOO_HIDDEN
 - [x] assoc-consts.rs:    // @!has assoc_consts/struct.Bar.html 'BAR_PRIVATE'
 - [x] assoc-consts.rs:    // @!has assoc_consts/struct.Bar.html 'BAR_HIDDEN'
 - [x] issue-53689.rs:// @!has - 'MyStruct'
 - [x] search-index-summaries.rs:// @!has - 'www.example.com'
 - [x] search-index-summaries.rs:// @!has - 'More Foo.'
 - [x] impl-everywhere.rs:// @!has foo/fn.foo.html '//section[@id="main"]//pre' "x: &\'x impl Foo"
 - [x] impl-everywhere.rs:// @!has foo/fn.foo.html '//section[@id="main"]//pre' "-> &\'x impl Foo {"
 - [x] impl-everywhere.rs:// @!has foo/fn.foo2.html '//section[@id="main"]//pre' "x: &\'x impl Foo"
 - [x] impl-everywhere.rs:// @!has foo/fn.foo2.html '//section[@id="main"]//pre' '-> impl Foo2 {'
 - [x] impl-everywhere.rs:// @!has foo/fn.foo_foo.html '//section[@id="main"]//pre' '-> impl Foo + Foo2 {'
 - [x] impl-everywhere.rs:// @!has foo/fn.foo2.html '//section[@id="main"]//pre' "x: &'x (impl Foo + Foo2)"
 - [x] issue-19190.rs:// @!has - '//*[@id="static_foo.v"]' 'fn static_foo()'
 - [x] issue-19190.rs:// @!has - '//*[@id="method.static_foo"]' 'fn static_foo()'
 - [x] deprecated-impls.rs:    // @!has - 'fn_def_def_with_doc full'
 - [x] deprecated-impls.rs:    // @!has - 'fn_empty_with_doc full'
 - [x] deprecated-impls.rs:    // @!has - 'fn_def_with full'
 - [x] deprecated-impls.rs:    // @!has - 'fn_def_def_with_doc full'
 - [x] issue-19190-3.rs:// @!has - '//*[@id="method.new"]' 'fn new() -> String'
 - [x] issue-19190-3.rs:// @!has - '//*[@id="method.static_baz"]' 'fn static_baz()'
 - [x] issue-19190-3.rs:// @!has - '//*[@id="method.static_baz"]' 'fn static_baz()'
 - [x] sidebar-items.rs:// @!has - '//*[@Class="sidebar-links"]/a' 'waza'
 - [x] sidebar-items.rs:// @!has - '//*[@Class="sidebar-links"]/a' 'waza'
 - [x] issue-27104.rs:// @!has - 'extern crate std'
 - [x] issue-27104.rs:// @!has - 'use std::prelude::'
 - [x] issue-13698.rs:// @!has issue_13698/struct.Foo.html '//*[@id="method.foo"]' 'fn foo'
 - [x] issue-13698.rs:// @!has issue_13698/struct.Foo.html '//*[@id="method.foo"]' 'fn bar'
 - [x] issue-41783.rs:// @!has - 'space'
 - [x] issue-41783.rs:// @!has - 'comment'
 - [x] trait-self-link.rs:// @!has trait_self_link/trait.Foo.html //a/@href ../trait_self_link/trait.Foo.html
 - [x] generic-impl.rs:// @!has foo/struct.Bar.html '//h3[@id="impl-ToString"]//code' 'impl<T> ToString for T'
 - [x] all.rs:// @!has foo/all.html 'private_module'
 - [x] issue-35169-2.rs:// @!has - '//*[@id="by_explicit_box.v"]' 'fn by_explicit_box(self: Box<Foo>)'
 - [x] issue-35169-2.rs:// @!has - '//*[@id="method.by_explicit_box"]' 'fn by_explicit_box(self: Box<Foo>)'
 - [x] issue-35169-2.rs:// @!has - '//*[@id="by_explicit_self_box.v"]' 'fn by_explicit_self_box(self: Box<Self>)'
 - [x] issue-35169-2.rs:// @!has - '//*[@id="method.by_explicit_self_box"]' 'fn by_explicit_self_box(self: Box<Self>)'
 - [x] issue-35169-2.rs:// @!has - '//*[@id="static_foo.v"]' 'fn static_foo()'
 - [x] issue-35169-2.rs:// @!has - '//*[@id="method.static_foo"]' 'fn static_foo()'
 - [x] doc-cfg.rs:// @!has - '//*[@id="main"]/*[@Class="stability"]/*[@Class="stab portability"]' ''
 - [x] inline_local/glob-private.rs:// @!has - "mod1"
 - [x] inline_local/glob-private.rs:// @!has - "Mod1Private"
 - [x] inline_local/glob-private.rs:// @!has - "mod2"
 - [x] inline_local/glob-private.rs:// @!has - "Mod2Private"
 - [x] inline_local/glob-private.rs:// @!has foo/struct.Mod1Private.html
 - [x] inline_local/glob-private.rs:// @!has foo/struct.Mod2Private.html
 - [x] inline_local/glob-private.rs:// @!has foo/mod1/index.html
 - [x] inline_local/glob-private.rs:// @!has foo/mod1/struct.Mod1Private.html
 - [x] inline_local/glob-private.rs:// @!has foo/mod1/struct.Mod2Public.html
 - [x] inline_local/glob-private.rs:// @!has foo/mod1/struct.Mod2Private.html
 - [x] inline_local/glob-private.rs:// @!has foo/mod1/mod2/index.html
 - [x] inline_local/glob-private.rs:// @!has foo/mod1/mod2/struct.Mod2Private.html
 - [x] inline_local/glob-private.rs:// @!has-dir foo/mod2
 - [x] inline_local/glob-private.rs:// @!has foo/mod2/index.html
 - [x] inline_local/glob-private.rs:// @!has foo/mod2/struct.Mod2Public.html
 - [x] inline_local/glob-private.rs:// @!has foo/mod2/struct.Mod2Private.html
 - [x] inline_local/hidden-use.rs:// @!has - 'private'
 - [x] inline_local/hidden-use.rs:// @!has - 'Foo'
 - [x] inline_local/hidden-use.rs:// @!has hidden_use/struct.Foo.html
 - [x] inline_local/glob-extern-no-defaults.rs:// @!has - "private_fn"
 - [x] inline_local/glob-extern-no-defaults.rs:// @!has foo/fn.private_fn.html
 - [x] inline_local/issue-32343.rs:// @!has issue_32343/struct.Foo.html
 - [x] inline_local/issue-32343.rs:// @!has - '//code/a' 'Foo'
 - [x] inline_local/issue-32343.rs:// @!has issue_32343/struct.Bar.html
 - [x] inline_local/glob-private-no-defaults.rs:// @!has - "Mod1Private"
 - [x] inline_local/glob-private-no-defaults.rs:// @!has - "mod2"
 - [x] inline_local/glob-private-no-defaults.rs:// @!has - "Mod2Private"
 - [x] inline_local/glob-private-no-defaults.rs:// @!has foo/struct.Mod1Private.html
 - [x] inline_local/glob-private-no-defaults.rs:// @!has foo/struct.Mod2Private.html
 - [x] inline_local/glob-private-no-defaults.rs:// @!has - "Mod2Public"
 - [x] inline_local/glob-private-no-defaults.rs:// @!has - "Mod2Private"
 - [x] inline_local/glob-private-no-defaults.rs:// @!has foo/mod1/struct.Mod2Public.html
 - [x] inline_local/glob-private-no-defaults.rs:// @!has foo/mod1/struct.Mod2Private.html
 - [x] inline_local/glob-private-no-defaults.rs:// @!has foo/mod2/index.html
 - [x] inline_local/glob-private-no-defaults.rs:// @!has foo/mod2/struct.Mod2Public.html
 - [x] inline_local/glob-private-no-defaults.rs:// @!has foo/mod2/struct.Mod2Private.html
 - [x] inline_local/glob-extern.rs:// @!has - "mod1"
 - [x] inline_local/glob-extern.rs:// @!has - "private_fn"
 - [x] inline_local/glob-extern.rs:// @!has foo/fn.private_fn.html
 - [x] inline_local/glob-extern.rs:// @!has foo/mod1/index.html
 - [x] inline_local/glob-extern.rs:// @!has foo/mod1/fn.private_fn.html
 - [x] inline_local/please_inline.rs:    // @!has - 'pub use foo::'
 - [x] inline_local/please_inline.rs:    // @!has please_inline/b/struct.Foo.html
 - [x] inline_cross/hidden-use.rs:// @!has - 'rustdoc_hidden'
 - [x] inline_cross/hidden-use.rs:// @!has - 'Bar'
 - [x] inline_cross/hidden-use.rs:// @!has hidden_use/struct.Bar.html
 - [x] inline_cross/inline_hidden.rs:// @!has - '//a/@title' 'Foo'
 - [x] inline_cross/assoc-items.rs:// @!has - 'PrivateConst'
 - [x] inline_cross/assoc-items.rs:// @!has - 'private_method'
 - [x] inline_cross/cross-glob.rs:// @!has cross_glob/index.html '//code' 'pub use inner::*;'
 - [x] inline_cross/macro-vis.rs:// @!has - '//pre' 'some_macro'
 - [x] inline_cross/macro-vis.rs:// @!has macro_vis/macro.other_macro.html
 - [x] inline_cross/macro-vis.rs:// @!has macro_vis/index.html '//a/@href' 'macro.other_macro.html'
 - [x] inline_cross/macro-vis.rs:// @!has - '//code' 'pub use qwop::other_macro;'
 - [x] inline_cross/macro-vis.rs:// @!has macro_vis/macro.super_macro.html
 - [x] inline_cross/issue-31948.rs:// @!has - '//*[@Class="impl"]//code' 'Bar for'
 - [x] inline_cross/issue-31948.rs:// @!has - '//*[@Class="impl"]//code' 'Qux for'
 - [x] inline_cross/issue-31948.rs:// @!has - '//code' 'for Wibble'
 - [x] inline_cross/issue-31948.rs:// @!has - '//code' 'for Wobble'
 - [x] inline_cross/issue-31948.rs:// @!has - '//code' 'for Wibble'
 - [x] inline_cross/issue-31948.rs:// @!has - '//code' 'for Wobble'
 - [x] inline_cross/issue-31948.rs:// @!has issue_31948/trait.Bar.html
 - [x] inline_cross/issue-31948.rs:// @!has issue_31948/trait.Qux.html
 - [x] inline_cross/issue-31948.rs:// @!has issue_31948/struct.Wibble.html
 - [x] inline_cross/issue-31948.rs:// @!has issue_31948/struct.Wobble.html
 - [x] inline_cross/issue-31948-1.rs:// @!has - '//*[@Class="impl"]//code' 'Bar for'
 - [x] inline_cross/issue-31948-1.rs:// @!has - '//*[@Class="impl"]//code' 'Qux for'
 - [x] inline_cross/issue-31948-1.rs:// @!has - '//code' 'for Wibble'
 - [x] inline_cross/issue-31948-1.rs:// @!has - '//code' 'for Wibble'
 - [x] inline_cross/issue-31948-1.rs:// @!has issue_31948_1/trait.Bar.html
 - [x] inline_cross/issue-31948-1.rs:// @!has issue_31948_1/trait.Qux.html
 - [x] inline_cross/issue-28480.rs:// @!has -  '//a/@title' 'Hidden'
 - [x] inline_cross/issue-28480.rs:// @!has -  '//a/@title' 'Hidden'
 - [x] inline_cross/issue-31948-2.rs:// @!has - '//*[@Class="impl"]//code' 'Bar for'
 - [x] inline_cross/issue-31948-2.rs:// @!has issue_31948_2/trait.Bar.html
 - [x] inline_cross/issue-31948-2.rs:// @!has issue_31948_2/trait.Woof.html
 - [x] inline_cross/issue-31948-2.rs:// @!has issue_31948_2/trait.Bark.html

It doesn't look like `@!matches` is used anywhere.
bors added a commit that referenced this pull request Oct 26, 2018
Rollup of 21 pull requests

Successful merges:

 - #54816 (Don't try to promote already promoted out temporaries)
 - #54824 (Cleanup rustdoc tests with `@!has` and `@!matches`)
 - #54921 (Add line numbers option to rustdoc)
 - #55167 (Add a "cheap" mode for `compute_missing_ctors`.)
 - #55258 (Fix Rustdoc ICE when checking blanket impls)
 - #55264 (Compile the libstd we distribute with -Ccodegen-unit=1)
 - #55271 (Unimplement ExactSizeIterator for MIR traversing iterators)
 - #55292 (Macro diagnostics tweaks)
 - #55298 (Point at macro definition when no rules expect token)
 - #55301 (List allowed tokens after macro fragments)
 - #55302 (Extend the impl_stable_hash_for! macro for miri.)
 - #55325 (Fix link to macros chapter)
 - #55343 (rustbuild: fix remap-debuginfo when building a release)
 - #55346 (Shrink `Statement`.)
 - #55358 (Remove redundant clone (2))
 - #55370 (Update mailmap for estebank)
 - #55375 (Typo fixes in configure_cmake comments)
 - #55378 (rustbuild: use configured linker to build boostrap)
 - #55379 (validity: assert that unions are non-empty)
 - #55383 (Use `SmallVec` for the queue in `coerce_unsized`.)
 - #55391 (bootstrap: clean up a few clippy findings)
@bors bors merged commit a9217e3 into rust-lang:master Oct 26, 2018
@Munksgaard Munksgaard deleted the fix-49713 branch October 24, 2020 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants