Skip to content

Commit af3aaba

Browse files
committed
Avoid using #[derive] in test
As per code review, it is preferred to not use derives in tests that aren't about them.
1 parent f4fc4a7 commit af3aaba

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

tests/ui/closures/2229_closure_analysis/only-inhabited-variant-stable.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// depending on whether some types are inhabited goes too far, introducing a
44
// bunch of headaches without much benefit.
55
//@ edition:2021
6-
#[derive(Clone, Copy, PartialEq, Eq, Debug)]
76
enum Void {}
87

98
pub fn main() {
@@ -19,5 +18,5 @@ pub fn main() {
1918
};
2019
f();
2120
g();
22-
assert_eq!(r, Err((1, 2)));
21+
assert!(matches!(r, Err((1, 2))));
2322
}

tests/ui/closures/2229_closure_analysis/only-inhabited-variant-stable.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0499]: cannot borrow `r` as mutable more than once at a time
2-
--> $DIR/only-inhabited-variant-stable.rs:15:17
2+
--> $DIR/only-inhabited-variant-stable.rs:14:17
33
|
44
LL | let mut f = || {
55
| -- first mutable borrow occurs here

0 commit comments

Comments
 (0)