]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/block-result/block-must-not-have-result-while.stderr
Remove E0308 note when primary label has all info
[rust.git] / src / test / ui / block-result / block-must-not-have-result-while.stderr
index 302d2972f7de14629551b7429e901641492f7804..72063ad1731df2bcc4fbabeb93565781148a42ed 100644 (file)
@@ -1,11 +1,16 @@
+warning: denote infinite loops with `loop { ... }`
+  --> $DIR/block-must-not-have-result-while.rs:2:5
+   |
+LL |     while true {
+   |     ^^^^^^^^^^ help: use `loop`
+   |
+   = note: `#[warn(while_true)]` on by default
+
 error[E0308]: mismatched types
   --> $DIR/block-must-not-have-result-while.rs:3:9
    |
 LL |         true
    |         ^^^^ expected (), found bool
-   |
-   = note: expected type `()`
-              found type `bool`
 
 error: aborting due to previous error