blob: d8d1b462ca3b69b3ee7e6b368a1c0ff8f1cb6a83 [file] [log] [blame]
trait Trait {
type Output;
}
impl Trait for () {
type Output = i32;
}
struct Struct<F>(F);
impl<F> Struct<F> {
pub fn new(_: F) -> Self {
todo!()
}
}
fn main() {
let _do_not_waste: Struct<impl Trait<Output = i32>> = Struct::new(());
//~^ ERROR `impl Trait` is not allowed in the type of variable bindings
}