Open
Description
This code
trait SomeTrait {
fn some_func();
}
fn todo_impl_trait() -> impl SomeTrait { todo!() }
does not compile because
the trait
SomeTrait is not implemented for ()
But such code
trait SomeTrait {
fn some_func();
}
fn todo_impl_trait<T: SomeTrait>() -> T { todo!() }
compiles correctly. Can this problem be resolved to use both todo!() and impl Trait?