-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't display
mut
in arguments for functions documentation
- Loading branch information
1 parent
4d0dd02
commit 5b82898
Showing
4 changed files
with
55 additions
and
28 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,16 @@ | ||
// Rustdoc shouldn't display `mut` in function arguments, which are | ||
// implementation details. Regression test for #81289. | ||
|
||
#![crate_name = "foo"] | ||
|
||
pub struct Foo; | ||
|
||
// @!has foo/struct.Foo.html '//*[@class="impl-items"]//*[@class="method"]' 'mut' | ||
impl Foo { | ||
pub fn foo(mut self) {} | ||
|
||
pub fn bar(mut bar: ()) {} | ||
} | ||
|
||
// @!has foo/fn.baz.html '//*[@class="rust fn"]' 'mut' | ||
pub fn baz(mut foo: Foo) {} |