rust/tests/pretty/hir-delegation.rs
Nicholas Nethercote 3cb9966235 Add a HIR pretty printing test for delegation.
Note that some of the output is currently bogus, with missing params and
args:
```
fn add(: _, : _) -> _ { m::add(, ) }
```
The next commit will fix this.
2025-04-10 14:09:37 +10:00

22 lines
288 B
Rust

//@ pretty-compare-only
//@ pretty-mode:hir
//@ pp-exact:hir-delegation.pp
#![allow(incomplete_features)]
#![feature(fn_delegation)]
fn b<C>(e: C) {}
trait G {
reuse b {}
}
mod m {
pub fn add(a: u32, b: u32) -> u32 { a + b }
}
reuse m::add;
fn main() {
_ = add(1, 2);
}