Skip to content

vec.rs has too many positions #5097

Description

@jld

A simple program:

fn main() { [0].position(|x| true); }

The result:

position.rs:1:12: 1:35 error: multiple applicable methods in scope
position.rs:1 fn main() { [0].position(|x| true); }
                          ^~~~~~~~~~~~~~~~~~~~~~~
position.rs:1:12: 1:35 note: candidate #1 is `core::vec::__extensions__::position`
position.rs:1 fn main() { [0].position(|x| true); }
                          ^~~~~~~~~~~~~~~~~~~~~~~
position.rs:1:12: 1:35 note: candidate #2 is `core::vec::__extensions__::position`
position.rs:1 fn main() { [0].position(|x| true); }
                          ^~~~~~~~~~~~~~~~~~~~~~~
error: aborting due to previous error

I think this is a conflict between impl<T:Eq> ImmutableEqVector<T> for &[T] and impl<A> iter::ExtendedIter<A> for &[A]

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions