Stream: t-compiler/wg-rls-2.0

Topic: Error enum generation


Daniel Mcnab (Aug 22 2019 at 12:18, on Zulip):

Could we provide a code action to do this automatically?!

matklad (Aug 22 2019 at 12:20, on Zulip):

Do what exactly?

Daniel Mcnab (Aug 22 2019 at 12:22, on Zulip):

Sorry - can't explain ATM - a situation has arisen. I'll try and explain later

Daniel Mcnab (Aug 22 2019 at 20:58, on Zulip):

So for example, if you have a function which uses Io::error and whatever other kind of errors, we could generate an enum for all the error cases with the right Into boilerplate.

matklad (Aug 23 2019 at 07:16, on Zulip):

THat seeems like it would misfire more often than not. I wonder if this can be split into components? For example, an intention to add From<Foo> for E for enum E { Foo(Foo) } would be nice...

Daniel Mcnab (Aug 23 2019 at 08:42, on Zulip):

It was just a passing thought I thought I should write down!

Daniel Mcnab (Aug 23 2019 at 12:17, on Zulip):

It was just a passing thought I thought I should write down!

Daniel Mcnab (Aug 23 2019 at 12:18, on Zulip):

Possibly we could support adding new variants

Last update: Nov 19 2019 at 18:10UTC