Stream: wg-async-foundations

Topic: Reversed type diagnostics?


nagisa (Oct 06 2019 at 22:17, on Zulip):

I have been finding myself super confused by some error messages related to async blocks and functions: mostly because their errors are reported in exactly the opposite location than I would expect…

nagisa (Oct 06 2019 at 22:17, on Zulip):

/me finds an example…

nagisa (Oct 06 2019 at 22:18, on Zulip):

https://paste.rs/rXR is the error and https://paste.rs/1vC.rs is the code. The wrong part with it is the fact that Ok(make_service) needs to be Ok::<_, ErrT>(make_service).

nagisa (Oct 06 2019 at 22:18, on Zulip):

But als I’ve found that plain type mismatch errors have reversed expected and found types.

nikomatsakis (Oct 07 2019 at 12:59, on Zulip):

@nagisa thanks for the report! can you file an issue?

nikomatsakis (Oct 07 2019 at 12:59, on Zulip):

I agree the span is not great

nikomatsakis (Oct 07 2019 at 12:59, on Zulip):

not sure off hand what it would take to fix it, but it'd be good to have a representative issue to track it

Giles Cope (Oct 08 2019 at 16:53, on Zulip):

( #65180 was the filed issue)

Last update: Nov 18 2019 at 01:55UTC