Skip to content

Erroneous ambiguous method error #3453

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
nikomatsakis opened this issue Sep 10, 2012 · 3 comments
Closed

Erroneous ambiguous method error #3453

nikomatsakis opened this issue Sep 10, 2012 · 3 comments
Labels
A-trait-system Area: Trait system A-type-system Area: Type system
Milestone

Comments

@nikomatsakis
Copy link
Contributor

Trying to use position() method on vecs, I get errors like

/Users/nmatsakis/versioned/rust-green/src/rustc/middle/typeck/check/method.rs:364:18: 364:44 error: multiple applicable methods in scope
/Users/nmatsakis/versioned/rust-green/src/rustc/middle/typeck/check/method.rs:364             match impl_info.methods.position(|m| m.ident == self.m_name) {
                                                                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/nmatsakis/versioned/rust-green/src/rustc/middle/typeck/check/method.rs:364:18: 364:44 note: candidate #1 is `core::vec::__extensions__::position`
/Users/nmatsakis/versioned/rust-green/src/rustc/middle/typeck/check/method.rs:364             match impl_info.methods.position(|m| m.ident == self.m_name) {
                                                                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/nmatsakis/versioned/rust-green/src/rustc/middle/typeck/check/method.rs:364:18: 364:44 note: candidate #2 is `core::vec::__extensions__::position`
/Users/nmatsakis/versioned/rust-green/src/rustc/middle/typeck/check/method.rs:364             match impl_info.methods.position(|m| m.ident == self.m_name) {
                                                                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~

that seem erroneous. Left some FIXMEs for uglier code that resulted from having to call vec::position() explicitly.

@catamorphism
Copy link
Contributor

I think this is fixed. Testing.

@catamorphism
Copy link
Contributor

Can close this when #5065 lands.

@ghost ghost assigned catamorphism Feb 21, 2013
@catamorphism
Copy link
Contributor

Fixed in 41a4151

bors pushed a commit to rust-lang-ci/rust that referenced this issue May 15, 2021
remove trailing whitespaces in missing spans
RalfJung pushed a commit to RalfJung/rust that referenced this issue Apr 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-trait-system Area: Trait system A-type-system Area: Type system
Projects
None yet
Development

No branches or pull requests

2 participants