Skip to content

vec.rs has too many positions #5097

@jld

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]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions