diff options
| author | David Tolnay <dtolnay@gmail.com> | 2025-02-01 14:27:04 -0800 |
|---|---|---|
| committer | David Tolnay <dtolnay@gmail.com> | 2025-02-01 14:36:42 -0800 |
| commit | 5f447a1ca6516fefe33fa0351aaf2c27b2911d98 (patch) | |
| tree | a9d2738528a96062840489463629575ae99926f6 | |
| parent | e08cd3cf05e5bfa3323cc21ea8f81f4a15a2f969 (diff) | |
| download | rust-5f447a1ca6516fefe33fa0351aaf2c27b2911d98.tar.gz rust-5f447a1ca6516fefe33fa0351aaf2c27b2911d98.zip | |
Add test of fn pointer without argument name
| -rw-r--r-- | tests/rustdoc/fn-pointer-arg-name.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/rustdoc/fn-pointer-arg-name.rs b/tests/rustdoc/fn-pointer-arg-name.rs index 3bde6e9ecfa..212c79dfab0 100644 --- a/tests/rustdoc/fn-pointer-arg-name.rs +++ b/tests/rustdoc/fn-pointer-arg-name.rs @@ -3,3 +3,11 @@ //@ has foo/fn.f.html //@ has - '//pre[@class="rust item-decl"]' 'pub fn f(callback: fn(len: usize, foo: u32))' pub fn f(callback: fn(len: usize, foo: u32)) {} + +//@ has foo/fn.g.html +//@ has - '//pre[@class="rust item-decl"]' 'pub fn g(_: fn(_: usize, _: u32))' +pub fn g(_: fn(usize, _: u32)) {} + +//@ has foo/fn.mixed.html +//@ has - '//pre[@class="rust item-decl"]' 'pub fn mixed(_: fn(_: usize, foo: u32))' +pub fn mixed(_: fn(usize, foo: u32)) {} |
