-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-associated-itemsArea: Associated items (types, constants & functions)Area: Associated items (types, constants & functions)C-bugCategory: This is a bug.Category: This is a bug.
Description
trait Doop {
type Shaboom;
fn badoowop(self) -> Self::Shaboom;
}
trait BaDoop: Doop { }
impl<T: BaDoop> Doop for T {
type Shaboom = T;
fn badoowop(self) -> Self {
self
}
}
fn main() { }
errors with
error: method `badoowop` has an incompatible type for trait:
expected associated type,
found type parameter
A similar issue happens when you now return Self::Shaboom
:
error: mismatched types: expected `<T as Doop>::Shaboom`,
found `T`
Metadata
Metadata
Assignees
Labels
A-associated-itemsArea: Associated items (types, constants & functions)Area: Associated items (types, constants & functions)C-bugCategory: This is a bug.Category: This is a bug.