-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of #128923 - GuillaumeGomez:negative-impls-items, r=fmease
[rustdoc] Stop showing impl items for negative impls Fixes #128799. As discussed with `@fmease,` they have a broader patch in progress, so this (small) PR will at least allow for them to have a regression test. :) r? `@fmease`
- Loading branch information
Showing
4 changed files
with
53 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// This test ensures that negative impls don't have items listed inside them. | ||
|
||
#![feature(negative_impls)] | ||
#![crate_name = "foo"] | ||
|
||
pub struct Thing; | ||
|
||
//@ has 'foo/struct.Thing.html' | ||
// We check the full path to ensure there is no `<details>` element. | ||
//@ has - '//div[@id="trait-implementations-list"]/section[@id="impl-Iterator-for-Thing"]/h3' \ | ||
// 'impl !Iterator for Thing' | ||
impl !Iterator for Thing {} | ||
|
||
// This struct will allow us to compare both paths. | ||
pub struct Witness; | ||
|
||
//@ has 'foo/struct.Witness.html' | ||
//@ has - '//div[@id="trait-implementations-list"]/details//section[@id="impl-Iterator-for-Witness"]/h3' \ | ||
// 'impl Iterator for Witness' | ||
impl Iterator for Witness { | ||
type Item = u8; | ||
|
||
fn next(&mut self) -> Option<Self::Item> { | ||
None | ||
} | ||
} |