Skip to content
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

type variables in method names are resolved in wrong scope #2312

Closed
nikomatsakis opened this issue Apr 27, 2012 · 3 comments
Closed

type variables in method names are resolved in wrong scope #2312

nikomatsakis opened this issue Apr 27, 2012 · 3 comments
Assignees
Labels
A-resolve Area: Name/path resolution done by `rustc_resolve` specifically
Milestone

Comments

@nikomatsakis
Copy link
Contributor

This does not work:

iface clam<A> { }


impl foo<A> for [A] {
   fn bar<B,C:clam<B>>(c: C) -> B { fail; }
}

fn main() { }

It yields:

/Users/nmatsakis/tmp/iface-res-bug.rs:5:19: 5:20 �error: unresolved typename: B
/Users/nmatsakis/tmp/iface-res-bug.rs:5    fn bar<B,C:clam<B>>(c: C) -> B { fail; }
@ghost ghost assigned marijnh Apr 27, 2012
@msullivan
Copy link
Contributor

Does resolve3 get this right?

@bstrie
Copy link
Contributor

bstrie commented Jul 16, 2012

This no longer fails with new resolve, though of course you have to prefix a sigil on [A].

@ghost ghost assigned brson Aug 2, 2012
brson added a commit that referenced this issue Aug 6, 2012
@brson
Copy link
Contributor

brson commented Aug 6, 2012

Closing.

@brson brson closed this as completed Aug 6, 2012
bors added a commit to rust-lang-ci/rust that referenced this issue Sep 22, 2022
put call to stacked borrows end_call in a more sensible place

This looks like a refactoring accident.
celinval added a commit to celinval/rust-dev that referenced this issue Jun 4, 2024
Use FnAbi instead of function signature when generating code for
function types. Properly check the `PassMode::Ignore`. For foreign
functions, instead of ignoring the declaration type, cast the arguments
and return value.

For now, we also ignore the caller location, since we don't currently
support tracking caller location. This change makes it easier for us to
do so. We might want to wait for this issue to get fixed so we can
easily add support using stable APIs:
rust-lang/project-stable-mir#62

Resolves rust-lang#2260
Resolves rust-lang#2312
Resolves rust-lang#1365
Resolves rust-lang#1350
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-resolve Area: Name/path resolution done by `rustc_resolve` specifically
Projects
None yet
Development

No branches or pull requests

5 participants