summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/eprint_with_newline.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:02:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:02:58 +0000
commit698f8c2f01ea549d77d7dc3338a12e04c11057b9 (patch)
tree173a775858bd501c378080a10dca74132f05bc50 /src/tools/clippy/tests/ui/eprint_with_newline.stderr
parentInitial commit. (diff)
downloadrustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.tar.xz
rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.zip
Adding upstream version 1.64.0+dfsg1.upstream/1.64.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/tools/clippy/tests/ui/eprint_with_newline.stderr')
-rw-r--r--src/tools/clippy/tests/ui/eprint_with_newline.stderr129
1 files changed, 129 insertions, 0 deletions
diff --git a/src/tools/clippy/tests/ui/eprint_with_newline.stderr b/src/tools/clippy/tests/ui/eprint_with_newline.stderr
new file mode 100644
index 000000000..f137787bf
--- /dev/null
+++ b/src/tools/clippy/tests/ui/eprint_with_newline.stderr
@@ -0,0 +1,129 @@
+error: using `eprint!()` with a format string that ends in a single newline
+ --> $DIR/eprint_with_newline.rs:5:5
+ |
+LL | eprint!("Hello/n");
+ | ^^^^^^^^^^^^^^^^^^
+ |
+ = note: `-D clippy::print-with-newline` implied by `-D warnings`
+help: use `eprintln!` instead
+ |
+LL - eprint!("Hello/n");
+LL + eprintln!("Hello");
+ |
+
+error: using `eprint!()` with a format string that ends in a single newline
+ --> $DIR/eprint_with_newline.rs:6:5
+ |
+LL | eprint!("Hello {}/n", "world");
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+help: use `eprintln!` instead
+ |
+LL - eprint!("Hello {}/n", "world");
+LL + eprintln!("Hello {}", "world");
+ |
+
+error: using `eprint!()` with a format string that ends in a single newline
+ --> $DIR/eprint_with_newline.rs:7:5
+ |
+LL | eprint!("Hello {} {}/n", "world", "#2");
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+help: use `eprintln!` instead
+ |
+LL - eprint!("Hello {} {}/n", "world", "#2");
+LL + eprintln!("Hello {} {}", "world", "#2");
+ |
+
+error: using `eprint!()` with a format string that ends in a single newline
+ --> $DIR/eprint_with_newline.rs:8:5
+ |
+LL | eprint!("{}/n", 1265);
+ | ^^^^^^^^^^^^^^^^^^^^^
+ |
+help: use `eprintln!` instead
+ |
+LL - eprint!("{}/n", 1265);
+LL + eprintln!("{}", 1265);
+ |
+
+error: using `eprint!()` with a format string that ends in a single newline
+ --> $DIR/eprint_with_newline.rs:9:5
+ |
+LL | eprint!("/n");
+ | ^^^^^^^^^^^^^
+ |
+help: use `eprintln!` instead
+ |
+LL - eprint!("/n");
+LL + eprintln!();
+ |
+
+error: using `eprint!()` with a format string that ends in a single newline
+ --> $DIR/eprint_with_newline.rs:28:5
+ |
+LL | eprint!("//n"); // should fail
+ | ^^^^^^^^^^^^^^^
+ |
+help: use `eprintln!` instead
+ |
+LL - eprint!("//n"); // should fail
+LL + eprintln!("/"); // should fail
+ |
+
+error: using `eprint!()` with a format string that ends in a single newline
+ --> $DIR/eprint_with_newline.rs:35:5
+ |
+LL | / eprint!(
+LL | | "
+LL | | "
+LL | | );
+ | |_____^
+ |
+help: use `eprintln!` instead
+ |
+LL ~ eprintln!(
+LL ~ ""
+ |
+
+error: using `eprint!()` with a format string that ends in a single newline
+ --> $DIR/eprint_with_newline.rs:39:5
+ |
+LL | / eprint!(
+LL | | r"
+LL | | "
+LL | | );
+ | |_____^
+ |
+help: use `eprintln!` instead
+ |
+LL ~ eprintln!(
+LL ~ r""
+ |
+
+error: using `eprint!()` with a format string that ends in a single newline
+ --> $DIR/eprint_with_newline.rs:47:5
+ |
+LL | eprint!("/r/n"); //~ ERROR
+ | ^^^^^^^^^^^^^^^^
+ |
+help: use `eprintln!` instead
+ |
+LL - eprint!("/r/n"); //~ ERROR
+LL + eprintln!("/r"); //~ ERROR
+ |
+
+error: using `eprint!()` with a format string that ends in a single newline
+ --> $DIR/eprint_with_newline.rs:48:5
+ |
+LL | eprint!("foo/rbar/n") // ~ ERROR
+ | ^^^^^^^^^^^^^^^^^^^^^
+ |
+help: use `eprintln!` instead
+ |
+LL - eprint!("foo/rbar/n") // ~ ERROR
+LL + eprintln!("foo/rbar") // ~ ERROR
+ |
+
+error: aborting due to 10 previous errors
+