-
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.
Auto merge of #85886 - GuillaumeGomez:rollup-l3yr3np, r=GuillaumeGomez
Rollup of 4 pull requests Successful merges: - #85473 (fix split-debuginfo error message) - #85622 (Remove toggle for "undocumented items.") - #85826 (Mention "null pointer optimization" in option docs.) - #85860 (Fix details rustdoc toggle for blanket impl) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
11 changed files
with
68 additions
and
57 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
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
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,18 @@ | ||
#![crate_name = "foo"] | ||
|
||
// Struct methods with documentation should be wrapped in a <details> toggle with an appropriate | ||
// summary. Struct methods with no documentation should not be wrapped. | ||
// | ||
// @has foo/struct.Foo.html | ||
// @has - '//details[@class="rustdoc-toggle method-toggle"]//summary//code' 'is_documented()' | ||
// @has - '//details[@class="rustdoc-toggle method-toggle"]//*[@class="docblock"]' 'is_documented is documented' | ||
// @!has - '//details[@class="rustdoc-toggle method-toggle"]//summary//code' 'not_documented()' | ||
pub struct Foo { | ||
} | ||
|
||
impl Foo { | ||
pub fn not_documented() {} | ||
|
||
/// is_documented is documented | ||
pub fn is_documented() {} | ||
} |
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 |
---|---|---|
@@ -1,11 +1,23 @@ | ||
#![crate_name = "foo"] | ||
|
||
// Trait methods with documentation should be wrapped in a <details> toggle with an appropriate | ||
// summary. Trait methods with no documentation should not be wrapped. | ||
// | ||
// @has foo/trait.Foo.html | ||
// @!has - '//details[@class="rustdoc-toggle"]//code' 'bar' | ||
// @has - '//code' 'bar' | ||
// @has - '//details[@class="rustdoc-toggle"]//code' 'foo' | ||
// @has - '//details[@class="rustdoc-toggle"]//summary//code' 'is_documented()' | ||
// @!has - '//details[@class="rustdoc-toggle"]//summary//code' 'not_documented()' | ||
// @has - '//details[@class="rustdoc-toggle"]//*[@class="docblock"]' 'is_documented is documented' | ||
// @has - '//details[@class="rustdoc-toggle"]//summary//code' 'is_documented_optional()' | ||
// @!has - '//details[@class="rustdoc-toggle"]//summary//code' 'not_documented_optional()' | ||
// @has - '//details[@class="rustdoc-toggle"]//*[@class="docblock"]' 'is_documented_optional is documented' | ||
pub trait Foo { | ||
fn bar() -> (); | ||
/// hello | ||
fn foo(); | ||
fn not_documented(); | ||
|
||
/// is_documented is documented | ||
fn is_documented(); | ||
|
||
fn not_documented_optional() {} | ||
|
||
/// is_documented_optional is documented | ||
fn is_documented_optional() {} | ||
} |