Skip to content

Commit

Permalink
rustdoc-json: Fix test so it actuall checks things
Browse files Browse the repository at this point in the history
After #111427, no item has a `kind` field, so these assertions could never
fail. Instead, assert that those two items arn't present.
  • Loading branch information
aDotInTheVoid committed Nov 9, 2023
1 parent 287ae4d commit 22e1576
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/rustdoc-json/reexport/pub_use_doc_hidden.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@

mod repeat_n {
#[doc(hidden)]
/// not here
pub struct RepeatN {}
}

/// not here
pub use repeat_n::RepeatN;

// @count "$.index[*][?(@.name=='pub_use_doc_hidden')].inner.items[*]" 0
// @!has "$.index[*][?(@.kind=='struct')]"
// @!has "$.index[*][?(@.kind=='import')]"
// @!has "$.index[*][?(@.docs == 'not here')]"

0 comments on commit 22e1576

Please sign in to comment.