Omit argument names from function pointers that do not have argument names

This commit is contained in:
David Tolnay 2025-02-01 14:54:02 -08:00
parent 5f447a1ca6
commit b866debf3c
No known key found for this signature in database
GPG key ID: F9BA143B95FF6D82
6 changed files with 27 additions and 13 deletions

View file

@ -11,10 +11,10 @@ macro_rules! gen {
}
//@ has 'foo/struct.Providers.html'
//@ has - '//*[@class="rust item-decl"]//code' "pub a: for<'tcx> fn(_: TyCtxt<'tcx>, _: u8) -> i8,"
//@ has - '//*[@class="rust item-decl"]//code' "pub b: for<'tcx> fn(_: TyCtxt<'tcx>, _: u16) -> i16,"
//@ has - '//*[@id="structfield.a"]/code' "a: for<'tcx> fn(_: TyCtxt<'tcx>, _: u8) -> i8"
//@ has - '//*[@id="structfield.b"]/code' "b: for<'tcx> fn(_: TyCtxt<'tcx>, _: u16) -> i16"
//@ has - '//*[@class="rust item-decl"]//code' "pub a: for<'tcx> fn(TyCtxt<'tcx>, u8) -> i8,"
//@ has - '//*[@class="rust item-decl"]//code' "pub b: for<'tcx> fn(TyCtxt<'tcx>, u16) -> i16,"
//@ has - '//*[@id="structfield.a"]/code' "a: for<'tcx> fn(TyCtxt<'tcx>, u8) -> i8"
//@ has - '//*[@id="structfield.b"]/code' "b: for<'tcx> fn(TyCtxt<'tcx>, u16) -> i16"
gen! {
(a, 'tcx, [u8], [i8])
(b, 'tcx, [u16], [i16])