Closed
Description
Code
#![feature(associated_types)]
pub trait Foo {
type Bar: Sized;
fn invoke(&self, bar: <Self as Foo>::Bar);
}
pub struct Wrap<F, B> {
foo: F,
bar: B,
}
impl<F: Foo> Wrap<F, <F as Foo>::Bar> {
// Does not compile ^^
}
pub fn main() {
}
Output
$ rustc at.rs
at.rs:14:22: 14:37 error: this associated type is not allowed in this context
at.rs:14 impl<F: Foo> Wrap<F, <F as Foo>::Bar> {
^~~~~~~~~~~~~~~
error: aborting due to previous error
Metadata
Metadata
Assignees
Labels
No labels