summary refs log tree commit diff
path: root/src/test/ui/fmt/feature-gate-format-args-capture.rs
blob: 21af91610915fb59e5cf24e0cfbfa217534e3ccd (plain)
1
2
3
4
5
6
fn main() {
    format!("{foo}");                //~ ERROR: there is no argument named `foo`

    // panic! doesn't hit format_args! unless there are two or more arguments.
    panic!("{foo} {bar}", bar=1);    //~ ERROR: there is no argument named `foo`
}