Skip to content

segfault on vector.filter #5444

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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