mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-02 07:22:42 +00:00
Add regression test for #81289
This commit is contained in:
parent
2a67e2e323
commit
793e88ad16
18
src/test/rustdoc/mut-params.rs
Normal file
18
src/test/rustdoc/mut-params.rs
Normal file
@ -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) {}
|
Loading…
Reference in New Issue
Block a user