We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Right now
trait T {} impl T for () {} fn should_ret_unit() -> impl T { panic!() }
compiles successfully, but
trait T {} impl T for () {} fn rec() -> impl T { rec() }
does not, even though
trait T {} impl T for () {} fn rec() -> ! { rec() }
does with the never_type feature gate.
never_type
I think we should "just make it work" (it's actually less special casing in the compiler to make it work than to make it error).
Similarly, with type alias impl trait, when we have
trait T {} impl T for i32 {} type U = impl T; fn foo() -> U { panic!() } fn bar() -> U { 42 }
it should just compile, as foo never produces any problematic value.
foo
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Right now
compiles successfully, but
does not, even though
does with the
never_type
feature gate.I think we should "just make it work" (it's actually less special casing in the compiler to make it work than to make it error).
Similarly, with type alias impl trait, when we have
it should just compile, as
foo
never produces any problematic value.The text was updated successfully, but these errors were encountered: