about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorRenato Lochetti <renato.lochetti@gmail.com>2023-06-07 08:35:39 +0100
committerRenato Lochetti <renato.lochetti@gmail.com>2023-06-07 09:42:37 +0100
commit3e8f53b51de543feca85af0d413376b18f598cb9 (patch)
treedb91d0b8330df00767ffd58cbd0ef88b9b106468 /tests
parentf72914732527904480887847fe2c20df42e24dc2 (diff)
downloadrust-3e8f53b51de543feca85af0d413376b18f598cb9.tar.gz
rust-3e8f53b51de543feca85af0d413376b18f598cb9.zip
Don't warn if there is a comment between else and curly bracket
Diffstat (limited to 'tests')
-rw-r--r--tests/ui/suspicious_else_formatting.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/ui/suspicious_else_formatting.rs b/tests/ui/suspicious_else_formatting.rs
index 4823d909208..a96cc1b090c 100644
--- a/tests/ui/suspicious_else_formatting.rs
+++ b/tests/ui/suspicious_else_formatting.rs
@@ -108,6 +108,13 @@ fn main() {
     else
     {
     }
+
+    //#10273 This is fine. Don't warn
+    if foo() {
+    } else
+    /* whelp */
+    {
+    }
 }
 
 // #7650 - Don't lint. Proc-macro using bad spans for `if` expressions.