Stream: wg-async-foundations

Topic: must-use lint


nikomatsakis (May 13 2019 at 20:38, on Zulip):

We should extend the must-use lint to suggest await for impl Future values -- has this idea been discussed?

nikomatsakis (May 13 2019 at 20:38, on Zulip):

(Should I file an issue?)

nikomatsakis (May 13 2019 at 20:38, on Zulip):

I think it's going to be a pretty important case in practice and probably fairly easy

nikomatsakis (May 13 2019 at 20:39, on Zulip):

/me sort of still wishes that we had made it an error to "drop" any value that was not type (), but water under the bridge now!

nikomatsakis (May 13 2019 at 20:39, on Zulip):

/me drags in debates from like 8 years ago

centril (May 13 2019 at 20:44, on Zulip):

I think filing an issue is good

centril (May 13 2019 at 20:44, on Zulip):

@nikomatsakis ostensibly we can just change the #[must_use ...] message for trait Future ?

centril (May 13 2019 at 20:45, on Zulip):

#[must_use = "futures do nothing unless polled"] https://doc.rust-lang.org/nightly/std/future/trait.Future.html

nikomatsakis (May 13 2019 at 20:46, on Zulip):

it seems like it's already implemented

nikomatsakis (May 13 2019 at 20:46, on Zulip):

er, right

nikomatsakis (May 13 2019 at 20:46, on Zulip):

you already said that :)

nikomatsakis (May 13 2019 at 20:46, on Zulip):

yeah, we should just change the message

centril (May 13 2019 at 20:46, on Zulip):

@nikomatsakis but it doesn't seem to trigger? https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=66d2920f7ea5ef6ddd8acfa23d8a2eee

centril (May 13 2019 at 20:47, on Zulip):

err, sorry, it does -- I'm just seeing poorly

nikomatsakis (May 13 2019 at 20:48, on Zulip):

Filed https://github.com/rust-lang/rust/issues/60797

centril (May 13 2019 at 20:50, on Zulip):

@nikomatsakis thanks; btw, whatever happened to the "good first issue" label? (we had that, right?)

nikomatsakis (May 13 2019 at 20:50, on Zulip):

yeah, not sure

nikomatsakis (May 13 2019 at 20:53, on Zulip):

https://twitter.com/nikomatsakis/status/1128040330694017024

nikomatsakis (May 13 2019 at 20:53, on Zulip):

I'm guessing it gets closed pretty fast ;)

centril (May 13 2019 at 20:55, on Zulip):

heh yeah

Jake Goulding (May 13 2019 at 21:02, on Zulip):

See also [this issue]https://github.com/rust-lang/rust/issues/51560) — nvm, I missed the point was to hint on adding .await

lqd (May 13 2019 at 22:26, on Zulip):

I'm guessing it gets closed pretty fast ;)

narrator: it was (and by multiple people concurrently)

Jake Goulding (May 14 2019 at 16:27, on Zulip):

Insert obligatory async/await/concurrent pun here.

Last update: Nov 18 2019 at 00:40UTC