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
The error message for this is poor and should suggest qualifying the type, or at least clearly saying that a value from MyEnum cannot be used as a type, and the span should then help the user understand (it is currently fine):
<anon>:6:13: 6:35 error: found value name used as a type: DefVariant(syntax::ast::DefId{krate: 0u32, node: 4u32}, syntax::ast::DefId{krate: 0u32, node: 5u32}, false)
<anon>:6 fn new() -> Result<MyEnum, String> {
^~~~~~~~~~~~~~~~~~~~~~
Error message comes from astconv, so we could probably catch this in resolve?
The text was updated successfully, but these errors were encountered:
This also changes how variant values are printed in errors, they are no
longer printed in their parent scope. As far as I can tell, this is
leftover from pre-namespacing of enums.
Closesrust-lang#17546.
This also changes how variant values are printed in errors, they are no
longer printed in their parent scope. As far as I can tell, this is
leftover from pre-namespacing of enums.
Closes#17546.
Couldn't find another issue for this.
The error message for this is poor and should suggest qualifying the type, or at least clearly saying that a value from
MyEnum
cannot be used as a type, and the span should then help the user understand (it is currently fine):Error message comes from astconv, so we could probably catch this in resolve?
The text was updated successfully, but these errors were encountered: