summaryrefslogtreecommitdiffstats
path: root/src/test/ui/macros/issue-99265.fixed
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 /src/test/ui/macros/issue-99265.fixed
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 'src/test/ui/macros/issue-99265.fixed')
-rw-r--r--src/test/ui/macros/issue-99265.fixed139
1 files changed, 0 insertions, 139 deletions
diff --git a/src/test/ui/macros/issue-99265.fixed b/src/test/ui/macros/issue-99265.fixed
deleted file mode 100644
index f3be9c628..000000000
--- a/src/test/ui/macros/issue-99265.fixed
+++ /dev/null
@@ -1,139 +0,0 @@
-// check-pass
-// run-rustfix
-
-fn main() {
- println!("{b} {a}", a=1, b=2);
- //~^ WARNING named argument `a` is not used by name [named_arguments_used_positionally]
- //~| HELP use the named argument by name to avoid ambiguity
-
- println!("{} {a} {b} {c} {d}", 0, a=1, b=2, c=3, d=4);
- //~^ WARNING named argument `a` is not used by name [named_arguments_used_positionally]
- //~| WARNING named argument `b` is not used by name [named_arguments_used_positionally]
- //~| WARNING named argument `c` is not used by name [named_arguments_used_positionally]
- //~| WARNING named argument `d` is not used by name [named_arguments_used_positionally]
- //~| HELP use the named argument by name to avoid ambiguity
- //~| HELP use the named argument by name to avoid ambiguity
- //~| HELP use the named argument by name to avoid ambiguity
- //~| HELP use the named argument by name to avoid ambiguity
-
- println!("Hello {:width$}!", "x", width = 5);
- //~^ WARNING named argument `width` is not used by name [named_arguments_used_positionally
- //~| HELP use the named argument by name to avoid ambiguity
-
- println!("Hello {f:width$.precision$}!", f = 0.02f32, width = 5, precision = 2);
- //~^ WARNING named argument `width` is not used by name [named_arguments_used_positionally
- //~| WARNING named argument `precision` is not used by name [named_arguments_used_positionally]
- //~| WARNING named argument `f` is not used by name [named_arguments_used_positionally]
- //~| HELP use the named argument by name to avoid ambiguity
- //~| HELP use the named argument by name to avoid ambiguity
- //~| HELP use the named argument by name to avoid ambiguity
-
- println!("Hello {f:width$.precision$}!", f = 0.02f32, width = 5, precision = 2);
- //~^ WARNING named argument `width` is not used by name [named_arguments_used_positionally
- //~| WARNING named argument `precision` is not used by name [named_arguments_used_positionally]
- //~| WARNING named argument `f` is not used by name [named_arguments_used_positionally]
- //~| HELP use the named argument by name to avoid ambiguity
- //~| HELP use the named argument by name to avoid ambiguity
- //~| HELP use the named argument by name to avoid ambiguity
-
- println!(
- "{}, Hello {f:width$.precision$} {g:width2$.precision2$}! {f}",
- //~^ HELP use the named argument by name to avoid ambiguity
- //~| HELP use the named argument by name to avoid ambiguity
- //~| HELP use the named argument by name to avoid ambiguity
- //~| HELP use the named argument by name to avoid ambiguity
- //~| HELP use the named argument by name to avoid ambiguity
- //~| HELP use the named argument by name to avoid ambiguity
- //~| HELP use the named argument by name to avoid ambiguity
- 1,
- f = 0.02f32,
- //~^ WARNING named argument `f` is not used by name [named_arguments_used_positionally]
- //~| WARNING named argument `f` is not used by name [named_arguments_used_positionally]
- width = 5,
- //~^ WARNING named argument `width` is not used by name [named_arguments_used_positionally
- precision = 2,
- //~^ WARNING named argument `precision` is not used by name [named_arguments_used_positionally]
- g = 0.02f32,
- //~^ WARNING named argument `g` is not used by name [named_arguments_used_positionally]
- width2 = 5,
- //~^ WARNING named argument `width2` is not used by name [named_arguments_used_positionally
- precision2 = 2
- //~^ WARNING named argument `precision2` is not used by name [named_arguments_used_positionally]
- );
-
- println!("Hello {f:0.1}!", f = 0.02f32);
- //~^ WARNING named argument `f` is not used by name [named_arguments_used_positionally]
- //~| HELP use the named argument by name to avoid ambiguity
-
- println!("Hello {f:0.1}!", f = 0.02f32);
- //~^ WARNING named argument `f` is not used by name [named_arguments_used_positionally]
- //~| HELP use the named argument by name to avoid ambiguity
-
- println!("Hello {f:width$.precision$}!", f = 0.02f32, width = 5, precision = 2);
-
- let width = 5;
- let precision = 2;
- println!("Hello {f:width$.precision$}!", f = 0.02f32);
-
- let val = 5;
- println!("{v:v$}", v = val);
- //~^ WARNING named argument `v` is not used by name [named_arguments_used_positionally]
- //~| WARNING named argument `v` is not used by name [named_arguments_used_positionally]
- //~| HELP use the named argument by name to avoid ambiguity
- //~| HELP use the named argument by name to avoid ambiguity
- println!("{v:v$}", v = val);
- //~^ WARNING named argument `v` is not used by name [named_arguments_used_positionally]
- //~| WARNING named argument `v` is not used by name [named_arguments_used_positionally]
- //~| HELP use the named argument by name to avoid ambiguity
- //~| HELP use the named argument by name to avoid ambiguity
- println!("{v:v$.v$}", v = val);
- //~^ WARNING named argument `v` is not used by name [named_arguments_used_positionally]
- //~| WARNING named argument `v` is not used by name [named_arguments_used_positionally]
- //~| WARNING named argument `v` is not used by name [named_arguments_used_positionally]
- //~| HELP use the named argument by name to avoid ambiguity
- //~| HELP use the named argument by name to avoid ambiguity
- //~| HELP use the named argument by name to avoid ambiguity
- println!("{v:v$.v$}", v = val);
- //~^ WARNING named argument `v` is not used by name [named_arguments_used_positionally]
- //~| WARNING named argument `v` is not used by name [named_arguments_used_positionally]
- //~| WARNING named argument `v` is not used by name [named_arguments_used_positionally]
- //~| HELP use the named argument by name to avoid ambiguity
- //~| HELP use the named argument by name to avoid ambiguity
- //~| HELP use the named argument by name to avoid ambiguity
-
- println!("{a} {a} {a}", a = 1);
- //~^ WARNING named argument `a` is not used by name [named_arguments_used_positionally]
- //~| WARNING named argument `a` is not used by name [named_arguments_used_positionally]
- //~| HELP use the named argument by name to avoid ambiguity
- //~| HELP use the named argument by name to avoid ambiguity
-
- println!("aaaaaaaaaaaaaaa\
- {a:b$.c$}",
- //~^ HELP use the named argument by name to avoid ambiguity
- //~| HELP use the named argument by name to avoid ambiguity
- //~| HELP use the named argument by name to avoid ambiguity
- a = 1.0, b = 1, c = 2,
- //~^ WARNING named argument `a` is not used by name [named_arguments_used_positionally]
- //~| WARNING named argument `b` is not used by name [named_arguments_used_positionally]
- //~| WARNING named argument `c` is not used by name [named_arguments_used_positionally]
- );
-
- println!("aaaaaaaaaaaaaaa\
- {a:b$.c$}",
- //~^ HELP use the named argument by name to avoid ambiguity
- //~| HELP use the named argument by name to avoid ambiguity
- //~| HELP use the named argument by name to avoid ambiguity
- a = 1.0, b = 1, c = 2,
- //~^ WARNING named argument `a` is not used by name [named_arguments_used_positionally]
- //~| WARNING named argument `b` is not used by name [named_arguments_used_positionally]
- //~| WARNING named argument `c` is not used by name [named_arguments_used_positionally]
- );
-
- println!("{{{x:width$.precision$}}}", x = 1.0, width = 3, precision = 2);
- //~^ WARNING named argument `x` is not used by name [named_arguments_used_positionally]
- //~| WARNING named argument `width` is not used by name [named_arguments_used_positionally]
- //~| WARNING named argument `precision` is not used by name [named_arguments_used_positionally]
- //~| HELP use the named argument by name to avoid ambiguity
- //~| HELP use the named argument by name to avoid ambiguity
- //~| HELP use the named argument by name to avoid ambiguity
-}