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

rustc: Better resolve errors for *T, &T, &mut T, Box<T> #14265

Closed
wants to merge 1 commit into from

Conversation

Ryman
Copy link
Contributor

@Ryman Ryman commented May 17, 2014

This is hard coding Box into this, as it doesn't seem to parse as TyUniq like ~ did. This may not be correct for all usages of the box keyword.

Closes #14254.

@Ryman
Copy link
Contributor Author

Ryman commented May 17, 2014

Travis failure looks unrelated.

a;
//~^ ERROR: unresolved name `a`. Did you mean to call `BarTy::a`?
b;
//~^ ERROR: unresolved name `b`. Did you mean to call `self.b`?
Copy link
Member

Choose a reason for hiding this comment

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

These messages may not be necessary because you can't actually access self.b (*T doesn't auto-deref) (similarly for the other errors). The static method one is ok, but the others may end up just being misleading.

@Ryman
Copy link
Contributor Author

Ryman commented May 20, 2014

@alexcrichton Added an rpass test to confirm things build with the suggestions. Can remove if considered overkill or too difficult to keep synced going forward. (Would be kind of neat if we could have an onfail message for rpass tests)

bors added a commit that referenced this pull request May 20, 2014
This is hard coding `Box` into this, as it doesn't seem to parse as `TyUniq` like `~` did. This may not be correct for all usages of the box keyword. 

Closes #14254.
@bors bors closed this May 20, 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.

ICE on resolve error inside impl block
3 participants