You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
unreachable_code warning when invoke .await on async diverging function #61798
We discussed this a bit on Zulip. The likely cause is that parts of the await desugaring are being linted against. We can likely check the span to see if the code that is being linted against is part of the .await desugaring, but we do want to be careful to ensure that
I'm now getting this warning even for functions that loop but eventually return. It worked fine with nightly-2019-08-21, but the latest nightly (2019-09-17) is broken.
Activity
nikomatsakis commentedon Jun 25, 2019
We discussed this a bit on Zulip. The likely cause is that parts of the await desugaring are being linted against. We can likely check the span to see if the code that is being linted against is part of the
.awaitdesugaring, but we do want to be careful to ensure thatstill gets a lint warning.
nikomatsakis commentedon Jun 25, 2019
Marking as deferred as this doesn't seem like a problem that needs to block stabilization.
Centril commentedon Jun 25, 2019
cc @varkor who has done some work on the inhabited logic stuff.
ChrisGreenaway commentedon Sep 18, 2019
I'm now getting this warning even for functions that loop but eventually return. It worked fine with nightly-2019-08-21, but the latest nightly (2019-09-17) is broken.
For example, this code generates a warning:
with the warning repeated twice:
PvdBerg1998 commentedon Sep 19, 2019
Can confirm. I believe this regressed somewhere after nightly 09-09-2019.
MOZGIII commentedon Sep 25, 2019
I think I have this in my code here: https://github.com/MOZGIII/netsound/blob/cc16cd94c3b5d0e75e18719f223e205f4aaaadb0/src/net/recv.rs#L46
Can somebody confirm this? If not I'll file another bug report.
PvdBerg1998 commentedon Sep 25, 2019
@MOZGIII yeah that's the same, the function can "never" return from the unconditional loop.
Rollup merge of rust-lang#64930 - davidtwco:issue-61798-diverging-awa…
Rollup merge of rust-lang#64930 - davidtwco:issue-61798-diverging-awa…