Stream: t-compiler

Topic: #54125 uninhabited checks


nikomatsakis (Oct 23 2018 at 17:39, on Zulip):

@varkor I'm confused by this comment of yours:

Maybe. There was only a single case in the stdlib in the end, and such a case in other code should be straightforwardly refactored.

In particular, I didn't see any edits to libstd?

varkor (Oct 23 2018 at 18:31, on Zulip):

@nikomatsakis: that confused me when you pointed it out, too.

varkor (Oct 23 2018 at 18:31, on Zulip):

because I don't remember reverting the change to libstd

varkor (Oct 23 2018 at 18:32, on Zulip):

I think what must have happened is that it got lost when I was rebasing and I didn't notice because the tests continued to pass

nikomatsakis (Oct 23 2018 at 18:32, on Zulip):

ok

nikomatsakis (Oct 23 2018 at 18:32, on Zulip):

I guess we don't test that configuration in travis

varkor (Oct 23 2018 at 18:33, on Zulip):

my suspicion is that the warning takes desugaring into account and that maybe https://github.com/rust-lang/rust/pull/54787 fixed it unintionally

varkor (Oct 23 2018 at 18:33, on Zulip):

well, the tests were failing before for the wasm target

nikomatsakis (Oct 23 2018 at 18:33, on Zulip):

oh, could .. be ..

varkor (Oct 23 2018 at 18:33, on Zulip):

it's just a guess though; I'm not really sure

nikomatsakis (Oct 23 2018 at 18:33, on Zulip):

ok, do you want to investigate?

nikomatsakis (Oct 23 2018 at 18:34, on Zulip):

or are you satisfied with PR as is

varkor (Oct 23 2018 at 18:37, on Zulip):

in terms of the externally-visible result, I'm happy either way — I think a warning is acceptable for cases like TcpStream, but if it's no longer going to warn in a desugared context, that also seems reasonable

but if you feel that we should work out exactly why this behaviour changed, I can investigate it

nikomatsakis (Oct 23 2018 at 19:00, on Zulip):

I'm satisfied either way I think

varkor (Oct 23 2018 at 20:35, on Zulip):

okay, let's just go with it; I feel like it's been in statis long enough :big_smile:

varkor (Oct 23 2018 at 20:36, on Zulip):

(that's one enthusiastic emoji)

varkor (Oct 24 2018 at 16:35, on Zulip):

https://github.com/rust-lang/rust/pull/54125#issuecomment-432732169

varkor (Oct 24 2018 at 16:35, on Zulip):

are you happy with the #[allow(unused_variables)] for TcpStream?

nikomatsakis (Oct 24 2018 at 18:38, on Zulip):

I am satisfied; I would be happier if it included a comment

nikomatsakis (Oct 24 2018 at 18:38, on Zulip):

(Maybe happier still if we could make it conditional on the configuration)

nikomatsakis (Oct 24 2018 at 18:38, on Zulip):

personally though this seems like a case where a comment is "just fine"

nikomatsakis (Oct 24 2018 at 18:39, on Zulip):

e.g., "In some configurations, e.g., WASM, TcpStream is not supported and hence this is dead code; suppress the resulting warning, since in other platforms, the code is not dead."

DPC (Dec 10 2018 at 09:54, on Zulip):

@nikomatsakis @varkor what's the status of this PR? can you update it on the PR? thanks (from triage)

Last update: Nov 16 2019 at 01:25UTC