Closed
Description
Compare
#![feature(existential_type)]
existential type T: ;
fn test(_unused: impl Copy) -> T {
|| {}
}
which results in error: type parameter `impl Copy` is part of concrete type but not used in parameter list for existential type
to
#![feature(existential_type)]
existential type T: ;
fn test(_unused: impl Copy) -> T {
fn workaround() -> impl Fn() {
|| {}
}
workaround()
}
which compiles fine.
There are quite a few open issues for existential types so I hope I haven't overlooked a duplicate. #42940 might be related.
Meta
rustc 1.33.0-nightly (03acbd71c 2019-01-14)
binary: rustc
commit-hash: 03acbd71c977cd63ce5f39ba9b6fe9ffd578785a
commit-date: 2019-01-14
host: x86_64-unknown-linux-gnu
release: 1.33.0-nightly
LLVM version: 8.0