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

Allow Self in impls. #20059

Merged
merged 1 commit into from
Dec 22, 2014
Merged

Allow Self in impls. #20059

merged 1 commit into from
Dec 22, 2014

Conversation

nrc
Copy link
Member

@nrc nrc commented Dec 20, 2014

r? @sfackler

closes #20000

// Note unhygenic comparison here. I think this is correct, since
// even though `Self` is almost just a type parameter, the treatment
// for this expansion is as if it were a keyword.
if path_as_ident.is_some() && path_as_ident.unwrap().name == token::intern("Self") {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought we had Self as a special ident, this is interning for every path!

@nrc nrc force-pushed the self-impl branch 2 times, most recently from eac981b to 7eb216d Compare December 20, 2014 08:01
@flaper87
Copy link
Contributor

nice 👍

alexcrichton added a commit to alexcrichton/rust that referenced this pull request Dec 21, 2014
@bors bors merged commit 31f5ab3 into rust-lang:master Dec 22, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tracking issue for RFC 522: allow Self type in impls
5 participants