We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ba5b6f3 commit 5ee181dCopy full SHA for 5ee181d
tests/ui-fulldeps/pprust-parenthesis-insertion.rs
@@ -1,5 +1,6 @@
1
//@ run-pass
2
//@ ignore-cross-compile
3
+//@ edition: 2021
4
5
// This test covers the AST pretty-printer's automatic insertion of parentheses
6
// into unparenthesized syntax trees according to precedence and various grammar
@@ -170,7 +171,9 @@ fn main() -> ExitCode {
170
171
let psess = &ParseSess::new(vec![rustc_parse::DEFAULT_LOCALE_RESOURCE]);
172
173
for &source_code in EXPRS {
- 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
+ };
177
178
// Check for FALSE POSITIVE: pretty-printer inserting parentheses where not needed.
179
// Pseudocode:
0 commit comments