forked from rust-lang/rust
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#81831 - LeSeulArtichaut:81289-mut-arg, r=ca…
…melid Don't display `mut` in arguments for functions documentation Fixes rust-lang#81289 by reverting rust-lang#80799, as requested in rust-lang#81328 (comment). Supersedes rust-lang#81328. r? ``@camelid`` cc ``@jyn514``
- Loading branch information
Showing
4 changed files
with
87 additions
and
2 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
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) {} |
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,5 +1,5 @@ | ||
#![crate_name = "foo"] | ||
|
||
// @has foo/fn.f.html | ||
// @has - '//*[@class="rust fn"]' 'pub fn f(0u8 ...255: u8)' | ||
// @has - '//*[@class="rust fn"]' 'pub fn f(_: u8)' | ||
pub fn f(0u8...255: u8) {} |