Using as
to get todo!
to work with impl
return gives false unreachable code warning
#123871
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Code
Current output
Desired output
Rationale and extra context
Using
todo!()
with a return type that isimpl
currently causes a type error. Usingas
to give it a specific type fixes that but brings this incorrect warning message.as T
by itself shouldn't really be considered an expression.Other cases
No response
Rust Version
Anything else?
No response
The text was updated successfully, but these errors were encountered: