Skip to content

Commit

Permalink
Show which test case was found to be meaningless
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Dec 21, 2024
1 parent ba5b6f3 commit 5ee181d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/ui-fulldeps/pprust-parenthesis-insertion.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//@ run-pass
//@ ignore-cross-compile
//@ edition: 2021

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

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

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

0 comments on commit 5ee181d

Please sign in to comment.