Skip to content

Commit

Permalink
update test stderr
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiaskrgr committed Aug 10, 2020
1 parent f59ec19 commit 6d0b5e2
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 22 deletions.
20 changes: 10 additions & 10 deletions tests/ui/checked_unwrap/complex_conditionals.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
error: you checked before that `unwrap()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`
error: you checked before that `unwrap()` cannot fail, instead of checking and unwrapping, it's better to use `if let` or `match`
--> $DIR/complex_conditionals.rs:8:9
|
LL | if x.is_ok() && y.is_err() {
Expand Down Expand Up @@ -36,7 +36,7 @@ LL | if x.is_ok() && y.is_err() {
LL | y.unwrap(); // will panic
| ^^^^^^^^^^

error: you checked before that `unwrap_err()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`
error: you checked before that `unwrap_err()` cannot fail, instead of checking and unwrapping, it's better to use `if let` or `match`
--> $DIR/complex_conditionals.rs:11:9
|
LL | if x.is_ok() && y.is_err() {
Expand All @@ -54,7 +54,7 @@ LL | if x.is_ok() || y.is_ok() {
LL | x.unwrap(); // will panic
| ^^^^^^^^^^

error: you checked before that `unwrap_err()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`
error: you checked before that `unwrap_err()` cannot fail, instead of checking and unwrapping, it's better to use `if let` or `match`
--> $DIR/complex_conditionals.rs:26:9
|
LL | if x.is_ok() || y.is_ok() {
Expand All @@ -72,7 +72,7 @@ LL | if x.is_ok() || y.is_ok() {
LL | y.unwrap(); // will panic
| ^^^^^^^^^^

error: you checked before that `unwrap_err()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`
error: you checked before that `unwrap_err()` cannot fail, instead of checking and unwrapping, it's better to use `if let` or `match`
--> $DIR/complex_conditionals.rs:28:9
|
LL | if x.is_ok() || y.is_ok() {
Expand All @@ -81,7 +81,7 @@ LL | if x.is_ok() || y.is_ok() {
LL | y.unwrap_err(); // unnecessary
| ^^^^^^^^^^^^^^

error: you checked before that `unwrap()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`
error: you checked before that `unwrap()` cannot fail, instead of checking and unwrapping, it's better to use `if let` or `match`
--> $DIR/complex_conditionals.rs:32:9
|
LL | if x.is_ok() && !(y.is_ok() || z.is_err()) {
Expand All @@ -107,7 +107,7 @@ LL | if x.is_ok() && !(y.is_ok() || z.is_err()) {
LL | y.unwrap(); // will panic
| ^^^^^^^^^^

error: you checked before that `unwrap_err()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`
error: you checked before that `unwrap_err()` cannot fail, instead of checking and unwrapping, it's better to use `if let` or `match`
--> $DIR/complex_conditionals.rs:35:9
|
LL | if x.is_ok() && !(y.is_ok() || z.is_err()) {
Expand All @@ -116,7 +116,7 @@ LL | if x.is_ok() && !(y.is_ok() || z.is_err()) {
LL | y.unwrap_err(); // unnecessary
| ^^^^^^^^^^^^^^

error: you checked before that `unwrap()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`
error: you checked before that `unwrap()` cannot fail, instead of checking and unwrapping, it's better to use `if let` or `match`
--> $DIR/complex_conditionals.rs:36:9
|
LL | if x.is_ok() && !(y.is_ok() || z.is_err()) {
Expand All @@ -143,7 +143,7 @@ LL | if x.is_ok() || !(y.is_ok() && z.is_err()) {
LL | x.unwrap(); // will panic
| ^^^^^^^^^^

error: you checked before that `unwrap_err()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`
error: you checked before that `unwrap_err()` cannot fail, instead of checking and unwrapping, it's better to use `if let` or `match`
--> $DIR/complex_conditionals.rs:46:9
|
LL | if x.is_ok() || !(y.is_ok() && z.is_err()) {
Expand All @@ -152,7 +152,7 @@ LL | if x.is_ok() || !(y.is_ok() && z.is_err()) {
LL | x.unwrap_err(); // unnecessary
| ^^^^^^^^^^^^^^

error: you checked before that `unwrap()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`
error: you checked before that `unwrap()` cannot fail, instead of checking and unwrapping, it's better to use `if let` or `match`
--> $DIR/complex_conditionals.rs:47:9
|
LL | if x.is_ok() || !(y.is_ok() && z.is_err()) {
Expand All @@ -179,7 +179,7 @@ LL | if x.is_ok() || !(y.is_ok() && z.is_err()) {
LL | z.unwrap(); // will panic
| ^^^^^^^^^^

error: you checked before that `unwrap_err()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`
error: you checked before that `unwrap_err()` cannot fail, instead of checking and unwrapping, it's better to use `if let` or `match`
--> $DIR/complex_conditionals.rs:50:9
|
LL | if x.is_ok() || !(y.is_ok() && z.is_err()) {
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/checked_unwrap/complex_conditionals_nested.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
error: you checked before that `unwrap()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`
error: you checked before that `unwrap()` cannot fail, instead of checking and unwrapping, it's better to use `if let` or `match`
--> $DIR/complex_conditionals_nested.rs:8:13
|
LL | if x.is_some() {
Expand Down
14 changes: 7 additions & 7 deletions tests/ui/checked_unwrap/simple_conditionals.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
error: you checked before that `unwrap()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`
error: you checked before that `unwrap()` cannot fail, instead of checking and unwrapping, it's better to use `if let` or `match`
--> $DIR/simple_conditionals.rs:39:9
|
LL | if x.is_some() {
Expand Down Expand Up @@ -35,7 +35,7 @@ LL | if x.is_none() {
LL | x.unwrap(); // will panic
| ^^^^^^^^^^

error: you checked before that `unwrap()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`
error: you checked before that `unwrap()` cannot fail, instead of checking and unwrapping, it's better to use `if let` or `match`
--> $DIR/simple_conditionals.rs:46:9
|
LL | if x.is_none() {
Expand All @@ -44,7 +44,7 @@ LL | if x.is_none() {
LL | x.unwrap(); // unnecessary
| ^^^^^^^^^^

error: you checked before that `unwrap()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`
error: you checked before that `unwrap()` cannot fail, instead of checking and unwrapping, it's better to use `if let` or `match`
--> $DIR/simple_conditionals.rs:7:13
|
LL | if $a.is_some() {
Expand All @@ -57,7 +57,7 @@ LL | m!(x);
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: you checked before that `unwrap()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`
error: you checked before that `unwrap()` cannot fail, instead of checking and unwrapping, it's better to use `if let` or `match`
--> $DIR/simple_conditionals.rs:54:9
|
LL | if x.is_ok() {
Expand All @@ -83,7 +83,7 @@ LL | if x.is_ok() {
LL | x.unwrap(); // will panic
| ^^^^^^^^^^

error: you checked before that `unwrap_err()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`
error: you checked before that `unwrap_err()` cannot fail, instead of checking and unwrapping, it's better to use `if let` or `match`
--> $DIR/simple_conditionals.rs:58:9
|
LL | if x.is_ok() {
Expand All @@ -100,7 +100,7 @@ LL | if x.is_err() {
LL | x.unwrap(); // will panic
| ^^^^^^^^^^

error: you checked before that `unwrap_err()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`
error: you checked before that `unwrap_err()` cannot fail, instead of checking and unwrapping, it's better to use `if let` or `match`
--> $DIR/simple_conditionals.rs:62:9
|
LL | if x.is_err() {
Expand All @@ -109,7 +109,7 @@ LL | x.unwrap(); // will panic
LL | x.unwrap_err(); // unnecessary
| ^^^^^^^^^^^^^^

error: you checked before that `unwrap()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`
error: you checked before that `unwrap()` cannot fail, instead of checking and unwrapping, it's better to use `if let` or `match`
--> $DIR/simple_conditionals.rs:64:9
|
LL | if x.is_err() {
Expand Down
8 changes: 4 additions & 4 deletions tests/ui/neg_cmp_op_on_partial_ord.stderr
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
error: the use of negated comparison operators on partially ordered types produces code that is hard to read and refactor. Please consider using the `partial_cmp` method instead, to make it clear that the two values could be incomparable.
error: the use of negated comparison operators on partially ordered types produces code that is hard to read and refactor, please consider using the `partial_cmp` method instead, to make it clear that the two values could be incomparable
--> $DIR/neg_cmp_op_on_partial_ord.rs:16:21
|
LL | let _not_less = !(a_value < another_value);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D clippy::neg-cmp-op-on-partial-ord` implied by `-D warnings`

error: the use of negated comparison operators on partially ordered types produces code that is hard to read and refactor. Please consider using the `partial_cmp` method instead, to make it clear that the two values could be incomparable.
error: the use of negated comparison operators on partially ordered types produces code that is hard to read and refactor, please consider using the `partial_cmp` method instead, to make it clear that the two values could be incomparable
--> $DIR/neg_cmp_op_on_partial_ord.rs:19:30
|
LL | let _not_less_or_equal = !(a_value <= another_value);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: the use of negated comparison operators on partially ordered types produces code that is hard to read and refactor. Please consider using the `partial_cmp` method instead, to make it clear that the two values could be incomparable.
error: the use of negated comparison operators on partially ordered types produces code that is hard to read and refactor, please consider using the `partial_cmp` method instead, to make it clear that the two values could be incomparable
--> $DIR/neg_cmp_op_on_partial_ord.rs:22:24
|
LL | let _not_greater = !(a_value > another_value);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^

error: the use of negated comparison operators on partially ordered types produces code that is hard to read and refactor. Please consider using the `partial_cmp` method instead, to make it clear that the two values could be incomparable.
error: the use of negated comparison operators on partially ordered types produces code that is hard to read and refactor, please consider using the `partial_cmp` method instead, to make it clear that the two values could be incomparable
--> $DIR/neg_cmp_op_on_partial_ord.rs:25:33
|
LL | let _not_greater_or_equal = !(a_value >= another_value);
Expand Down

0 comments on commit 6d0b5e2

Please sign in to comment.