mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-15 20:45:45 +03:00
Add comment pointing to test
This commit is contained in:
@@ -685,6 +685,9 @@ pub fn check_user_unop(
|
||||
if let Some(sp) =
|
||||
self.tcx.sess.parse_sess.ambiguous_block_expr_parse.borrow().get(&sp)
|
||||
{
|
||||
// If the previous expression was a block expression, suggest parentheses
|
||||
// (turning this into a binary subtraction operation instead.)
|
||||
// for example, `{2} - 2` -> `({2}) - 2` (see src\test\ui\parser\expr-as-stmt.rs)
|
||||
self.tcx.sess.parse_sess.expr_parentheses_needed(&mut err, *sp);
|
||||
} else {
|
||||
match actual.kind() {
|
||||
|
||||
Reference in New Issue
Block a user