]> git.lizzy.rs Git - rust.git/blob - tests/ui/macros/unreachable-format-args.rs
Rollup merge of #106714 - Ezrashaw:remove-e0490, r=davidtwco
[rust.git] / tests / ui / macros / unreachable-format-args.rs
1 // ignore-emscripten no processes
2
3 // revisions: edition_2015 edition_2021
4 // [edition_2015]edition:2015
5 // [edition_2021]edition:2021
6 // [edition_2015]check-fail
7 // [edition_2021]run-fail
8 // [edition_2015]error-pattern:there is no argument named `x`
9 // [edition_2021]error-pattern:internal error: entered unreachable code: x is 5 and y is 0
10
11 fn main() {
12     let x = 5;
13     unreachable!("x is {x} and y is {y}", y = 0);
14 }