Skip to content

Commit

Permalink
Add regression test for #81289
Browse files Browse the repository at this point in the history
  • Loading branch information
LeSeulArtichaut committed Feb 10, 2021
1 parent 2a67e2e commit 793e88a
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/test/rustdoc/mut-params.rs
@@ -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) {}

0 comments on commit 793e88a

Please sign in to comment.