summaryrefslogtreecommitdiffstats
path: root/tests/ui/macros/issue-98466.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
commit218caa410aa38c29984be31a5229b9fa717560ee (patch)
treec54bd55eeb6e4c508940a30e94c0032fbd45d677 /tests/ui/macros/issue-98466.stderr
parentReleasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz
rustc-218caa410aa38c29984be31a5229b9fa717560ee.zip
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/macros/issue-98466.stderr')
-rw-r--r--tests/ui/macros/issue-98466.stderr81
1 files changed, 81 insertions, 0 deletions
diff --git a/tests/ui/macros/issue-98466.stderr b/tests/ui/macros/issue-98466.stderr
new file mode 100644
index 000000000..c93451c76
--- /dev/null
+++ b/tests/ui/macros/issue-98466.stderr
@@ -0,0 +1,81 @@
+warning: named argument `_x` is not used by name
+ --> $DIR/issue-98466.rs:7:26
+ |
+LL | println!("_x is {}", _x = 5);
+ | -- ^^ this named argument is referred to by position in formatting string
+ | |
+ | this formatting argument uses named argument `_x` by position
+ |
+ = note: `#[warn(named_arguments_used_positionally)]` on by default
+help: use the named argument by name to avoid ambiguity
+ |
+LL | println!("_x is {_x}", _x = 5);
+ | ++
+
+warning: named argument `y` is not used by name
+ --> $DIR/issue-98466.rs:10:26
+ |
+LL | println!("_x is {}", y = _x);
+ | -- ^ this named argument is referred to by position in formatting string
+ | |
+ | this formatting argument uses named argument `y` by position
+ |
+help: use the named argument by name to avoid ambiguity
+ |
+LL | println!("_x is {y}", y = _x);
+ | +
+
+warning: named argument `y` is not used by name
+ --> $DIR/issue-98466.rs:13:83
+ |
+LL | println!("first positional arg {}, second positional arg {}, _x is {}", 1, 2, y = _x);
+ | -- ^ this named argument is referred to by position in formatting string
+ | |
+ | this formatting argument uses named argument `y` by position
+ |
+help: use the named argument by name to avoid ambiguity
+ |
+LL | println!("first positional arg {}, second positional arg {}, _x is {y}", 1, 2, y = _x);
+ | +
+
+warning: named argument `_x` is not used by name
+ --> $DIR/issue-98466.rs:19:34
+ |
+LL | let _f = format!("_x is {}", _x = 5);
+ | -- ^^ this named argument is referred to by position in formatting string
+ | |
+ | this formatting argument uses named argument `_x` by position
+ |
+help: use the named argument by name to avoid ambiguity
+ |
+LL | let _f = format!("_x is {_x}", _x = 5);
+ | ++
+
+warning: named argument `y` is not used by name
+ --> $DIR/issue-98466.rs:22:34
+ |
+LL | let _f = format!("_x is {}", y = _x);
+ | -- ^ this named argument is referred to by position in formatting string
+ | |
+ | this formatting argument uses named argument `y` by position
+ |
+help: use the named argument by name to avoid ambiguity
+ |
+LL | let _f = format!("_x is {y}", y = _x);
+ | +
+
+warning: named argument `y` is not used by name
+ --> $DIR/issue-98466.rs:25:91
+ |
+LL | let _f = format!("first positional arg {}, second positional arg {}, _x is {}", 1, 2, y = _x);
+ | -- ^ this named argument is referred to by position in formatting string
+ | |
+ | this formatting argument uses named argument `y` by position
+ |
+help: use the named argument by name to avoid ambiguity
+ |
+LL | let _f = format!("first positional arg {}, second positional arg {}, _x is {y}", 1, 2, y = _x);
+ | +
+
+warning: 6 warnings emitted
+