diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2025-04-10 13:44:57 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2025-04-10 14:46:53 +1000 |
| commit | 9bb1008e1d8da55be5e383b552e5e9e3774e37fe (patch) | |
| tree | 5fbca098b04ef12cba74cea9b1c326b516f098a3 /tests | |
| parent | 3cb9966235a981cfea1bbf2536ebd5021bcbca5e (diff) | |
| download | rust-9bb1008e1d8da55be5e383b552e5e9e3774e37fe.tar.gz rust-9bb1008e1d8da55be5e383b552e5e9e3774e37fe.zip | |
Avoid empty identifiers for delegate params and args.
Instead use `argN`. The empty identifiers could flow to `Liveness::should_warn`, where they would trigger a bounds error. Fixes #139512.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/pretty/hir-delegation.pp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/pretty/hir-delegation.pp b/tests/pretty/hir-delegation.pp index 1dc83ed635c..872a6a45aed 100644 --- a/tests/pretty/hir-delegation.pp +++ b/tests/pretty/hir-delegation.pp @@ -11,13 +11,13 @@ extern crate std; fn b<C>(e: C) { } trait G { - fn b(: _) -> _ { b({ }) } + fn b(arg0: _) -> _ { b({ }) } } mod m { fn add(a: u32, b: u32) -> u32 { a + b } } -fn add(: _, : _) -> _ { m::add(, ) } +fn add(arg0: _, arg1: _) -> _ { m::add(arg0, arg1) } fn main() { { let _ = add(1, 2); }; } |
