diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:13 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:13 +0000 |
commit | 218caa410aa38c29984be31a5229b9fa717560ee (patch) | |
tree | c54bd55eeb6e4c508940a30e94c0032fbd45d677 /tests/ui/parser/require-parens-for-chained-comparison.stderr | |
parent | Releasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-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/parser/require-parens-for-chained-comparison.stderr')
-rw-r--r-- | tests/ui/parser/require-parens-for-chained-comparison.stderr | 110 |
1 files changed, 110 insertions, 0 deletions
diff --git a/tests/ui/parser/require-parens-for-chained-comparison.stderr b/tests/ui/parser/require-parens-for-chained-comparison.stderr new file mode 100644 index 000000000..52e201c43 --- /dev/null +++ b/tests/ui/parser/require-parens-for-chained-comparison.stderr @@ -0,0 +1,110 @@ +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<X>(); + | ^ ^ + | +help: use `::<...>` instead of `<...>` to specify lifetime, type, or const arguments + | +LL | f::<X>(); + | ++ + +error: comparison operators cannot be chained + --> $DIR/require-parens-for-chained-comparison.rs:14:6 + | +LL | f<Result<Option<X>, Option<Option<X>>>(1, 2); + | ^ ^ + | +help: use `::<...>` instead of `<...>` to specify lifetime, type, or const arguments + | +LL | f::<Result<Option<X>, Option<Option<X>>>(1, 2); + | ++ + +error: expected one of `!`, `.`, `::`, `;`, `?`, `else`, `{`, or an operator, found `,` + --> $DIR/require-parens-for-chained-comparison.rs:18:17 + | +LL | let _ = f<u8, i8>(); + | ^ expected one of 8 possible tokens + | +help: use `::<...>` instead of `<...>` to specify lifetime, type, or const arguments + | +LL | let _ = f::<u8, i8>(); + | ++ + +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 + | +help: add `'` to close the char literal + | +LL | let _ = f<'_', i8>(); + | + + +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:28:9 + | +LL | f<'_>(); + | ^ expected `while`, `for`, `loop` or `{` after a label + | +help: add `'` to close the char literal + | +LL | f<'_'>(); + | + + +error: comparison operators cannot be chained + --> $DIR/require-parens-for-chained-comparison.rs:28: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:34:14 + | +LL | let _ = f<u8>; + | ^ ^ + | + = 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 + |