-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rustdoc: Negative impls are not notable
- Loading branch information
1 parent
8387315
commit 8994840
Showing
4 changed files
with
32 additions
and
0 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
1 change: 1 addition & 0 deletions
1
tests/rustdoc/notable-trait/doc-notable_trait-negative.negative.html
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 @@ | ||
<script type="text/json" id="notable-traits-data">{"Negative":"</code></pre>"}</script> |
1 change: 1 addition & 0 deletions
1
tests/rustdoc/notable-trait/doc-notable_trait-negative.positive.html
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 @@ | ||
<script type="text/json" id="notable-traits-data">{"Positive":"<h3>Notable traits for <code><a class=\"struct\" href=\"struct.Positive.html\" title=\"struct doc_notable_trait_negative::Positive\">Positive</a></code></h3><pre><code><div class=\"where\">impl <a class=\"trait\" href=\"trait.SomeTrait.html\" title=\"trait doc_notable_trait_negative::SomeTrait\">SomeTrait</a> for <a class=\"struct\" href=\"struct.Positive.html\" title=\"struct doc_notable_trait_negative::Positive\">Positive</a></div>"}</script> |
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,22 @@ | ||
#![feature(doc_notable_trait, negative_impls)] | ||
|
||
#[doc(notable_trait)] | ||
pub trait SomeTrait {} | ||
|
||
pub struct Positive; | ||
impl SomeTrait for Positive {} | ||
|
||
pub struct Negative; | ||
impl !SomeTrait for Negative {} | ||
|
||
// @has doc_notable_trait_negative/fn.positive.html | ||
// @snapshot positive - '//script[@id="notable-traits-data"]' | ||
pub fn positive() -> Positive { | ||
todo!() | ||
} | ||
|
||
// @has doc_notable_trait_negative/fn.negative.html | ||
// @count - '//script[@id="notable-traits-data"]' 0 | ||
pub fn negative() -> Negative { | ||
&[] | ||
} |