rust/tests/pretty/hir-delegation.pp
Vadim Petrochenkov c56f49dc34 expand: Micro-optimize prelude injection
Use `splice` to avoid shifting the other items twice.
Put `extern crate std;` first so it's already resolved when we resolve `::std::prelude::rust_20XX`.
2025-07-28 17:35:09 +03:00

25 lines
457 B
Rust

//@ pretty-compare-only
//@ pretty-mode:hir
//@ pp-exact:hir-delegation.pp
#![allow(incomplete_features)]
#![feature(fn_delegation)]
#[attr = MacroUse {arguments: UseAll}]
extern crate std;
#[prelude_import]
use ::std::prelude::rust_2015::*;
fn b<C>(e: C) { }
trait G {
fn b(arg0: _) -> _ { b({ }) }
}
mod m {
fn add(a: u32, b: u32) -> u32 { a + b }
}
fn add(arg0: _, arg1: _) -> _ { m::add(arg0, arg1) }
fn main() { { let _ = add(1, 2); }; }