From 698f8c2f01ea549d77d7dc3338a12e04c11057b9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:02:58 +0200 Subject: Adding upstream version 1.64.0+dfsg1. Signed-off-by: Daniel Baumann --- .../require-parens-for-chained-comparison.stderr | 100 +++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 src/test/ui/parser/require-parens-for-chained-comparison.stderr (limited to 'src/test/ui/parser/require-parens-for-chained-comparison.stderr') diff --git a/src/test/ui/parser/require-parens-for-chained-comparison.stderr b/src/test/ui/parser/require-parens-for-chained-comparison.stderr new file mode 100644 index 000000000..0bf52854e --- /dev/null +++ b/src/test/ui/parser/require-parens-for-chained-comparison.stderr @@ -0,0 +1,100 @@ +error: comparison operators cannot be chained + --> $DIR/require-parens-for-chained-comparison.rs:2:11 + | +LL | false == false == false; + | ^^ ^^ + | +help: split the comparison into two + | +LL | false == false && false == false; + | ++++++++ + +error: comparison operators cannot be chained + --> $DIR/require-parens-for-chained-comparison.rs:6:11 + | +LL | false == 0 < 2; + | ^^ ^ + | +help: parenthesize the comparison + | +LL | false == (0 < 2); + | + + + +error: comparison operators cannot be chained + --> $DIR/require-parens-for-chained-comparison.rs:10:6 + | +LL | f(); + | ^ ^ + | +help: use `::<...>` instead of `<...>` to specify lifetime, type, or const arguments + | +LL | f::(); + | ++ + +error: comparison operators cannot be chained + --> $DIR/require-parens-for-chained-comparison.rs:14:6 + | +LL | f, Option>>(1, 2); + | ^ ^ + | +help: use `::<...>` instead of `<...>` to specify lifetime, type, or const arguments + | +LL | f::, Option>>(1, 2); + | ++ + +error: expected one of `!`, `.`, `::`, `;`, `?`, `else`, `{`, or an operator, found `,` + --> $DIR/require-parens-for-chained-comparison.rs:18:17 + | +LL | let _ = f(); + | ^ expected one of 8 possible tokens + | +help: use `::<...>` instead of `<...>` to specify lifetime, type, or const arguments + | +LL | let _ = f::(); + | ++ + +error: expected `while`, `for`, `loop` or `{` after a label + --> $DIR/require-parens-for-chained-comparison.rs:22:17 + | +LL | let _ = f<'_, i8>(); + | ^ expected `while`, `for`, `loop` or `{` after a label + +error: expected one of `.`, `:`, `;`, `?`, `else`, `for`, `loop`, `while`, or an operator, found `,` + --> $DIR/require-parens-for-chained-comparison.rs:22:17 + | +LL | let _ = f<'_, i8>(); + | ^ expected one of 9 possible tokens + | +help: use `::<...>` instead of `<...>` to specify lifetime, type, or const arguments + | +LL | let _ = f::<'_, i8>(); + | ++ + +error: expected `while`, `for`, `loop` or `{` after a label + --> $DIR/require-parens-for-chained-comparison.rs:27:9 + | +LL | f<'_>(); + | ^ expected `while`, `for`, `loop` or `{` after a label + +error: comparison operators cannot be chained + --> $DIR/require-parens-for-chained-comparison.rs:27:6 + | +LL | f<'_>(); + | ^ ^ + | +help: use `::<...>` instead of `<...>` to specify lifetime, type, or const arguments + | +LL | f::<'_>(); + | ++ + +error: comparison operators cannot be chained + --> $DIR/require-parens-for-chained-comparison.rs:32:14 + | +LL | let _ = f; + | ^ ^ + | + = help: use `::<...>` instead of `<...>` to specify lifetime, type, or const arguments + = help: or use `(...)` if you meant to specify fn arguments + +error: aborting due to 10 previous errors + -- cgit v1.2.3