Skip to content

Commit

Permalink
Auto merge of #80565 - camelid:fix-not-has, r=GuillaumeGomez
Browse files Browse the repository at this point in the history
Fix tests that incorrectly used `!@has` instead of `@!has`

The command is ``@!has`,` not `!`@has`.` I don't think these checks were
doing anything before! Ideally we would accept `!`@has`` as well, or at
least fail tests that use `!`@has`.` The current behavior seems to be
silently ignoring the check, which is very confusing.

r? `@GuillaumeGomez`
  • Loading branch information
bors committed Jan 1, 2021
2 parents a609fb4 + 2c405ae commit 206ee1e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/test/rustdoc/inline_local/trait-vis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ mod asdf {

// @has trait_vis/struct.SomeStruct.html
// @has - '//code' 'impl ThisTrait for SomeStruct'
// !@has - '//code' 'impl PrivateTrait for SomeStruct'
// @!has - '//code' 'impl PrivateTrait for SomeStruct'
pub use asdf::SomeStruct;
2 changes: 1 addition & 1 deletion src/test/rustdoc/issue-74083.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ impl Foo {
}

// @has issue_74083/struct.Bar.html
// !@has - '//div[@class="sidebar-links"]/a[@href="#method.foo"]' 'foo'
// @!has - '//div[@class="sidebar-links"]/a[@href="#method.foo"]' 'foo'
pub struct Bar {
foo: Foo,
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/rustdoc/remove-url-from-headings.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#![crate_name = "foo"]

// @has foo/fn.foo.html
// !@has - '//a[@href="http://a.a"]'
// @!has - '//a[@href="http://a.a"]'
// @has - '//a[@href="#implementing-stuff-somewhere"]' 'Implementing stuff somewhere'
// @has - '//a[@href="#another-one-urg"]' 'Another one urg'

Expand Down

0 comments on commit 206ee1e

Please sign in to comment.