-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
af18bf8
commit 2d6c4b3
Showing
1 changed file
with
18 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Rustdoc shouldn't display `mut` in function arguments, which are | ||
// implementation details. Regression test for #81289. | ||
|
||
#![crate_name = "foo"] | ||
|
||
pub struct Foo; | ||
|
||
// @count foo/struct.Foo.html '//*[@class="impl-items"]//*[@class="method"]' 2 | ||
// @!has - '//*[@class="impl-items"]//*[@class="method"]' 'mut' | ||
impl Foo { | ||
pub fn foo(mut self) {} | ||
|
||
pub fn bar(mut bar: ()) {} | ||
} | ||
|
||
// @count foo/fn.baz.html '//*[@class="rust fn"]' 1 | ||
// @!has - '//*[@class="rust fn"]' 'mut' | ||
pub fn baz(mut foo: Foo) {} |