Skip to content

Commit 1f2028f

Browse files
committed
Show which test case was found to be meaningless
1 parent 822e806 commit 1f2028f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/ui-fulldeps/pprust-parenthesis-insertion.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,9 @@ fn main() -> ExitCode {
166166
let psess = &ParseSess::new(vec![rustc_parse::DEFAULT_LOCALE_RESOURCE]);
167167

168168
for &source_code in EXPRS {
169-
let expr = parse_expr(psess, source_code).unwrap();
169+
let Some(expr) = parse_expr(psess, source_code) else {
170+
panic!("Failed to parse original test case: {source_code}");
171+
};
170172

171173
// Check for FALSE POSITIVE: pretty-printer inserting parentheses where not needed.
172174
// Pseudocode:

0 commit comments

Comments
 (0)