Skip to content

Commit

Permalink
Bless rustdoc for new negative impls
Browse files Browse the repository at this point in the history
We now mention `[T]: !Iterator`, though arguably we shouldn't. I don't
believe that changes to `doc_notable_trait` should be done in this PR, though.
  • Loading branch information
compiler-errors committed May 15, 2024
1 parent aa66524 commit 6cbbb8b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<script type="text/json" id="notable-traits-data">{"&amp;'static [SomeStruct]":"&lt;h3&gt;Notable traits for &lt;code&gt;&amp;amp;[&lt;a class=\"struct\" href=\"struct.SomeStruct.html\" title=\"struct doc_notable_trait_slice::SomeStruct\"&gt;SomeStruct&lt;/a&gt;]&lt;/code&gt;&lt;/h3&gt;&lt;pre&gt;&lt;code&gt;&lt;div class=\"where\"&gt;impl &lt;a class=\"trait\" href=\"trait.SomeTrait.html\" title=\"trait doc_notable_trait_slice::SomeTrait\"&gt;SomeTrait&lt;/a&gt; for &amp;amp;[&lt;a class=\"struct\" href=\"struct.SomeStruct.html\" title=\"struct doc_notable_trait_slice::SomeStruct\"&gt;SomeStruct&lt;/a&gt;]&lt;/div&gt;"}</script>
<script type="text/json" id="notable-traits-data">{"&amp;'static [SomeStruct]":"&lt;h3&gt;Notable traits for &lt;code&gt;&lt;a class=\"primitive\" href=\"{{channel}}/std/primitive.slice.html\"&gt;[T]&lt;/a&gt;&lt;/code&gt;&lt;/h3&gt;&lt;pre&gt;&lt;code&gt;&lt;div class=\"where\"&gt;impl&amp;lt;T&amp;gt; !&lt;a class=\"trait\" href=\"{{channel}}/core/iter/traits/iterator/trait.Iterator.html\" title=\"trait core::iter::traits::iterator::Iterator\"&gt;Iterator&lt;/a&gt; for &lt;a class=\"primitive\" href=\"{{channel}}/std/primitive.slice.html\"&gt;[T]&lt;/a&gt;&lt;/div&gt;&lt;div class=\"where\"&gt;impl &lt;a class=\"trait\" href=\"trait.SomeTrait.html\" title=\"trait doc_notable_trait_slice::SomeTrait\"&gt;SomeTrait&lt;/a&gt; for &amp;amp;[&lt;a class=\"struct\" href=\"struct.SomeStruct.html\" title=\"struct doc_notable_trait_slice::SomeStruct\"&gt;SomeStruct&lt;/a&gt;]&lt;/div&gt;"}</script>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<script type="text/json" id="notable-traits-data">{"&amp;'static mut [SomeStruct]":"&lt;h3&gt;Notable traits for &lt;code&gt;&lt;a class=\"primitive\" href=\"{{channel}}/std/primitive.slice.html\"&gt;[T]&lt;/a&gt;&lt;/code&gt;&lt;/h3&gt;&lt;pre&gt;&lt;code&gt;&lt;div class=\"where\"&gt;impl&amp;lt;T&amp;gt; !&lt;a class=\"trait\" href=\"{{channel}}/core/iter/traits/iterator/trait.Iterator.html\" title=\"trait core::iter::traits::iterator::Iterator\"&gt;Iterator&lt;/a&gt; for &lt;a class=\"primitive\" href=\"{{channel}}/std/primitive.slice.html\"&gt;[T]&lt;/a&gt;&lt;/div&gt;"}</script>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<script type="text/json" id="notable-traits-data">{"&amp;'static [OtherStruct]":"&lt;h3&gt;Notable traits for &lt;code&gt;&lt;a class=\"primitive\" href=\"{{channel}}/std/primitive.slice.html\"&gt;[T]&lt;/a&gt;&lt;/code&gt;&lt;/h3&gt;&lt;pre&gt;&lt;code&gt;&lt;div class=\"where\"&gt;impl&amp;lt;T&amp;gt; !&lt;a class=\"trait\" href=\"{{channel}}/core/iter/traits/iterator/trait.Iterator.html\" title=\"trait core::iter::traits::iterator::Iterator\"&gt;Iterator&lt;/a&gt; for &lt;a class=\"primitive\" href=\"{{channel}}/std/primitive.slice.html\"&gt;[T]&lt;/a&gt;&lt;/div&gt;"}</script>
4 changes: 2 additions & 2 deletions tests/rustdoc/notable-trait/doc-notable_trait-slice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ pub fn bare_fn_matches() -> &'static [SomeStruct] {
}

// @has doc_notable_trait_slice/fn.bare_fn_no_matches.html
// @count - '//script[@id="notable-traits-data"]' 0
// @snapshot bare_fn_no_matches - '//script[@id="notable-traits-data"]'
pub fn bare_fn_no_matches() -> &'static [OtherStruct] {
&[]
}

// @has doc_notable_trait_slice/fn.bare_fn_mut_no_matches.html
// @count - '//script[@id="notable-traits-data"]' 0
// @snapshot bare_fn_mut_no_matches - '//script[@id="notable-traits-data"]'
pub fn bare_fn_mut_no_matches() -> &'static mut [SomeStruct] {
&mut []
}

0 comments on commit 6cbbb8b

Please sign in to comment.