summaryrefslogtreecommitdiffstats
path: root/tests/ui/fmt/format-args-capture-issue-94010.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/fmt/format-args-capture-issue-94010.rs')
-rw-r--r--tests/ui/fmt/format-args-capture-issue-94010.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/ui/fmt/format-args-capture-issue-94010.rs b/tests/ui/fmt/format-args-capture-issue-94010.rs
new file mode 100644
index 000000000..bd03e9c93
--- /dev/null
+++ b/tests/ui/fmt/format-args-capture-issue-94010.rs
@@ -0,0 +1,7 @@
+fn main() {
+ const FOO: i32 = 123;
+ println!("{foo:X}");
+ //~^ ERROR: cannot find value `foo` in this scope
+ println!("{:.foo$}", 0);
+ //~^ ERROR: cannot find value `foo` in this scope
+}