Skip to content

Commit 40c9538

Browse files
committed
Fix test
1 parent 6a99573 commit 40c9538

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Diff for: src/test/compile-fail/defaulted-unit-warning.rs

+6-3
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,12 @@ impl Deserialize for () {
2121
}
2222

2323
fn doit() -> Result<(), String> {
24-
let _ = Deserialize::deserialize()?;
25-
//~^ ERROR code relies on type
26-
//~| WARNING previously accepted
24+
let _ = match Deserialize::deserialize() {
25+
//~^ ERROR code relies on type
26+
//~| WARNING previously accepted
27+
Ok(x) => x,
28+
Err(e) => return Err(e),
29+
};
2730
Ok(())
2831
}
2932

0 commit comments

Comments
 (0)