Closed
Description
I tried this code:
pub struct Struct;
impl Struct {
pub fn function(funs: Vec<Fn() -> ()>) {}
}
I expected to see this happen: Give me some compile error about Fn() -> () not being sized.
Instead, this happened:
src/lib.rs:4:21: 4:25 warning: unused variable: `funs`, #[warn(unused_variables)] on by default
src/lib.rs:4 pub fn function(funs: Vec<Fn() -> ()>) {}
^~~~
src/lib.rs:1:1: 1:1 error: internal compiler error: Encountered error `Unimplemented` selecting `Binder(core::iter::IntoIterator)` during trans
src/lib.rs:1 pub struct Struct;
^
Meta
rustc --version --verbose
:
rustc 1.0.0-nightly (cfea8ec41 2015-03-10) (built 2015-03-10)
binary: rustc
commit-hash: cfea8ec41699e25c8fb524d625190f0cb860dc71
commit-date: 2015-03-10
build-date: 2015-03-10
host: x86_64-apple-darwin
release: 1.0.0-nightly