Skip to content

segfault on vector.filter #5444

Closed
Closed
@rossmurray

Description

@rossmurray

There's a segfault when running the following code (it compiles fine).

fn main() {
  let v = ~[1,2,3,4];
  let b = v.filter(|&i| i > 1);
}

Changing |&i| i > 1 to |i| *i > 1 does not fix the problem. However, using the vec::filter function instead of the method does not segfault.

Possibly related: #4878

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions