Skip to content

Commit 5ee181d

Browse files
committed
Show which test case was found to be meaningless
1 parent ba5b6f3 commit 5ee181d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//@ run-pass
22
//@ ignore-cross-compile
3+
//@ edition: 2021
34

45
// This test covers the AST pretty-printer's automatic insertion of parentheses
56
// into unparenthesized syntax trees according to precedence and various grammar
@@ -170,7 +171,9 @@ fn main() -> ExitCode {
170171
let psess = &ParseSess::new(vec![rustc_parse::DEFAULT_LOCALE_RESOURCE]);
171172

172173
for &source_code in EXPRS {
173-
let expr = parse_expr(psess, source_code).unwrap();
174+
let Some(expr) = parse_expr(psess, source_code) else {
175+
panic!("Failed to parse original test case: {source_code}");
176+
};
174177

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

0 commit comments

Comments
 (0)