error[E0308]: mismatched types
  --> $DIR/while-type-error.rs:3:19
   |
LL | fn main() { while main { } }
   |                   ^^^^ expected `bool`, found fn item
   |
   = note: expected type `bool`
           found fn item `fn() {main}`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0308`.
