We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Option::expect
1 parent 0b9995b commit e1048b5Copy full SHA for e1048b5
src/compiletest/errors.rs
@@ -93,9 +93,8 @@ fn parse_expected(last_nonfollow_error: Option<usize>,
93
94
let (which, line) = if follow {
95
assert!(adjusts == 0, "use either //~| or //~^, not both.");
96
- let line = last_nonfollow_error.unwrap_or_else(|| {
97
- panic!("encountered //~| without preceding //~^ line.")
98
- });
+ let line = last_nonfollow_error.expect("encountered //~| without \
+ preceding //~^ line.");
99
(FollowPrevious(line), line)
100
} else {
101
let which =
0 commit comments