diff options
Diffstat (limited to 'tests/ui/fmt/ifmt-bad-format-args.stderr')
-rw-r--r-- | tests/ui/fmt/ifmt-bad-format-args.stderr | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/ui/fmt/ifmt-bad-format-args.stderr b/tests/ui/fmt/ifmt-bad-format-args.stderr new file mode 100644 index 000000000..2db280c5e --- /dev/null +++ b/tests/ui/fmt/ifmt-bad-format-args.stderr @@ -0,0 +1,21 @@ +error: requires at least a format string argument + --> $DIR/ifmt-bad-format-args.rs:2:5 + | +LL | format_args!(); + | ^^^^^^^^^^^^^^ + | + = note: this error originates in the macro `format_args` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: format argument must be a string literal + --> $DIR/ifmt-bad-format-args.rs:3:18 + | +LL | format_args!(|| {}); + | ^^^^^ + | +help: you might be missing a string literal to format with + | +LL | format_args!("{}", || {}); + | +++++ + +error: aborting due to 2 previous errors + |