Do not complain about missing main when a block has been recovered#67413
Do not complain about missing main when a block has been recovered#67413estebank wants to merge 1 commit intorust-lang:masterfrom
Conversation
There was a problem hiding this comment.
Are you sure that we actually reach Eof in all cases, e.g. the return below?
There was a problem hiding this comment.
I had to change it back. Setting reached_eof before all of the returns in the loop would cause the missing main error to come up (!?).
bf807ef to
5ba85e6
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
5ba85e6 to
e63a9fc
Compare
This comment has been minimized.
This comment has been minimized.
|
I don't feel entirely comfortable reviewing the correctness of this right now (in particular that we don't suddenly allow code) and I don't have much time to do an in-depth review, so I'll r? @petrochenkov for now. That said, here's a sledge-hammer suggestion which would be easy to be confident in: Record whether |
|
I'd rather get rid of This is such a random ad hoc bit of logic. |
|
The existing logic seems to set I don't want to have this debt accumulating on top of other debt, reporting a false positive "no main" error in some cases has much less importance than that. |
Follow up to https://github.com/rust-lang/rust/pull/66183/files#r346077120.
r? @Centril