1 // compile-flags: --error-format json -Zunstable-options
4 // The output for humans should just highlight the whole span without showing
5 // the suggested replacement, but we also want to test that suggested
6 // replacement only removes one set of parentheses, rather than naïvely
7 // stripping away any starting or ending parenthesis characters—hence this
8 // test of the JSON error format.
10 #![deny(unused_parens)]
11 #![allow(unreachable_code)]
14 // We want to suggest the properly-balanced expression `1 / (2 + 3)`, not
15 // the malformed `1 / (2 + 3`
16 let _a = 1 / (2 + 3); //~ERROR unnecessary parentheses
22 if (break { return true }) {