1
Fork 0

Add test of fn pointer without argument name

This commit is contained in:
David Tolnay 2025-02-01 14:27:04 -08:00
parent e08cd3cf05
commit 5f447a1ca6
No known key found for this signature in database
GPG key ID: F9BA143B95FF6D82

View file

@ -3,3 +3,11 @@
//@ has foo/fn.f.html //@ has foo/fn.f.html
//@ has - '//pre[@class="rust item-decl"]' 'pub fn f(callback: fn(len: usize, foo: u32))' //@ has - '//pre[@class="rust item-decl"]' 'pub fn f(callback: fn(len: usize, foo: u32))'
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)) {}