summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui-toml/allow_mixed_uninlined_format_args
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:57:31 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:57:31 +0000
commitdc0db358abe19481e475e10c32149b53370f1a1c (patch)
treeab8ce99c4b255ce46f99ef402c27916055b899ee /src/tools/clippy/tests/ui-toml/allow_mixed_uninlined_format_args
parentReleasing progress-linux version 1.71.1+dfsg1-2~progress7.99u1. (diff)
downloadrustc-dc0db358abe19481e475e10c32149b53370f1a1c.tar.xz
rustc-dc0db358abe19481e475e10c32149b53370f1a1c.zip
Merging upstream version 1.72.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/tools/clippy/tests/ui-toml/allow_mixed_uninlined_format_args')
-rw-r--r--src/tools/clippy/tests/ui-toml/allow_mixed_uninlined_format_args/uninlined_format_args.fixed1
-rw-r--r--src/tools/clippy/tests/ui-toml/allow_mixed_uninlined_format_args/uninlined_format_args.rs1
-rw-r--r--src/tools/clippy/tests/ui-toml/allow_mixed_uninlined_format_args/uninlined_format_args.stderr12
3 files changed, 8 insertions, 6 deletions
diff --git a/src/tools/clippy/tests/ui-toml/allow_mixed_uninlined_format_args/uninlined_format_args.fixed b/src/tools/clippy/tests/ui-toml/allow_mixed_uninlined_format_args/uninlined_format_args.fixed
index 23e7bc16d..c90856845 100644
--- a/src/tools/clippy/tests/ui-toml/allow_mixed_uninlined_format_args/uninlined_format_args.fixed
+++ b/src/tools/clippy/tests/ui-toml/allow_mixed_uninlined_format_args/uninlined_format_args.fixed
@@ -1,5 +1,6 @@
//@run-rustfix
#![warn(clippy::uninlined_format_args)]
+#![allow(clippy::unnecessary_literal_unwrap)]
fn main() {
let local_i32 = 1;
diff --git a/src/tools/clippy/tests/ui-toml/allow_mixed_uninlined_format_args/uninlined_format_args.rs b/src/tools/clippy/tests/ui-toml/allow_mixed_uninlined_format_args/uninlined_format_args.rs
index d66b2b8ff..661350c5c 100644
--- a/src/tools/clippy/tests/ui-toml/allow_mixed_uninlined_format_args/uninlined_format_args.rs
+++ b/src/tools/clippy/tests/ui-toml/allow_mixed_uninlined_format_args/uninlined_format_args.rs
@@ -1,5 +1,6 @@
//@run-rustfix
#![warn(clippy::uninlined_format_args)]
+#![allow(clippy::unnecessary_literal_unwrap)]
fn main() {
let local_i32 = 1;
diff --git a/src/tools/clippy/tests/ui-toml/allow_mixed_uninlined_format_args/uninlined_format_args.stderr b/src/tools/clippy/tests/ui-toml/allow_mixed_uninlined_format_args/uninlined_format_args.stderr
index 1be0cda12..6ec79a618 100644
--- a/src/tools/clippy/tests/ui-toml/allow_mixed_uninlined_format_args/uninlined_format_args.stderr
+++ b/src/tools/clippy/tests/ui-toml/allow_mixed_uninlined_format_args/uninlined_format_args.stderr
@@ -1,5 +1,5 @@
error: variables can be used directly in the `format!` string
- --> $DIR/uninlined_format_args.rs:9:5
+ --> $DIR/uninlined_format_args.rs:10:5
|
LL | println!("val='{}'", local_i32);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -12,7 +12,7 @@ LL + println!("val='{local_i32}'");
|
error: variables can be used directly in the `format!` string
- --> $DIR/uninlined_format_args.rs:10:5
+ --> $DIR/uninlined_format_args.rs:11:5
|
LL | println!("Hello {} is {:.*}", "x", local_i32, local_f64);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -24,7 +24,7 @@ LL + println!("Hello {} is {local_f64:.local_i32$}", "x");
|
error: literal with an empty format string
- --> $DIR/uninlined_format_args.rs:10:35
+ --> $DIR/uninlined_format_args.rs:11:35
|
LL | println!("Hello {} is {:.*}", "x", local_i32, local_f64);
| ^^^
@@ -37,7 +37,7 @@ LL + println!("Hello x is {:.*}", local_i32, local_f64);
|
error: variables can be used directly in the `format!` string
- --> $DIR/uninlined_format_args.rs:11:5
+ --> $DIR/uninlined_format_args.rs:12:5
|
LL | println!("Hello {} is {:.*}", local_i32, 5, local_f64);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -49,7 +49,7 @@ LL + println!("Hello {local_i32} is {local_f64:.*}", 5);
|
error: variables can be used directly in the `format!` string
- --> $DIR/uninlined_format_args.rs:12:5
+ --> $DIR/uninlined_format_args.rs:13:5
|
LL | println!("Hello {} is {2:.*}", local_i32, 5, local_f64);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -61,7 +61,7 @@ LL + println!("Hello {local_i32} is {local_f64:.*}", 5);
|
error: variables can be used directly in the `format!` string
- --> $DIR/uninlined_format_args.rs:13:5
+ --> $DIR/uninlined_format_args.rs:14:5
|
LL | println!("{}, {}", local_i32, local_opt.unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^