Closed
Description
trait A {
type Bla;
fn to_bla(&self) -> Bla;
}
yields
error[E0412]: cannot find type `Bla` in this scope
--> src/main.rs:3:25
|
3 | fn to_bla(&self) -> Bla;
| ^^^ not found in this scope
error: aborting due to previous error
it would be helpful to suggest to change the to_bla
return type to Self::Bla;
which fixes the error:
trait A {
type Bla;
fn to_bla(&self) -> Self::Bla;
}
fn main() {}