Skip to content

Encountered error Unimplemented selecting Binder(core::iter::IntoIterator) during trans #23281

Closed
@faern

Description

@faern

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions