Skip to content

Removed unused E0406 and unused functions #34342

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

Merged
merged 1 commit into from
Jun 18, 2016
Merged

Conversation

GuillaumeGomez
Copy link
Member

@GuillaumeGomez GuillaumeGomez commented Jun 18, 2016

Fixes #34301.

It removes the unused E0406 and also unused functions.

cc @eddyb

@rust-highfive
Copy link
Contributor

r? @nrc

(rust_highfive has picked a reviewer for you, use r? to override)

this.with_type_parameter_rib(NoTypeParameters, |this| {
visit::walk_trait_item(this, trait_item)
});
types.push(format!("{}", trait_item.ident));
Copy link
Member

@eddyb eddyb Jun 18, 2016

Choose a reason for hiding this comment

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

You don't need/want to convert them to strings, comparing Names is O(1).

@eddyb
Copy link
Member

eddyb commented Jun 18, 2016

This breaks associated types that come from a different trait which Self also implements.
And it only looks at argument types, without even recursing into them.

I don't know what E0406 is, but I don't see a point in producing an error earlier in the pipeline.
Resolve doesn't resolve associated types, that's a job for typeck, which knows best.

@GuillaumeGomez
Copy link
Member Author

This breaks associated types that come from a different trait which Self also implements.
And it only looks at argument types, without even recursing into them.

It does recurse, I added the get_path method. Take a look into it.

@eddyb
Copy link
Member

eddyb commented Jun 18, 2016

@GuillaumeGomez Oh hah, I missed that because of singular/plural.
As discussed on IRC, I believe the path forward is to remove the leftover {visit,resolve}_generics, E0406 and update E0220's description to be more general.

@nikhilshagri
Copy link
Contributor

I can take up the task of updating E0220. Should I move forward with it or wait until this PR is merged?

@GuillaumeGomez
Copy link
Member Author

No, you can do it as soon as you want. The PR will just remove unused mechanisms.

this.with_type_parameter_rib(NoTypeParameters, |this| {
visit::walk_trait_item(this, trait_item)
});
}
Copy link
Member

Choose a reason for hiding this comment

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

I think this change (moving the match arms) is unnecessary.

@GuillaumeGomez GuillaumeGomez changed the title E0406 is now thrown like expected Removed unused E0406 and unused functions Jun 18, 2016
@GuillaumeGomez GuillaumeGomez force-pushed the E0406 branch 2 times, most recently from 7f0cac0 to b54341e Compare June 18, 2016 15:01
@eddyb
Copy link
Member

eddyb commented Jun 18, 2016

@bors r+

@bors
Copy link
Collaborator

bors commented Jun 18, 2016

📌 Commit 8637b4b has been approved by eddyb

@bors
Copy link
Collaborator

bors commented Jun 18, 2016

⌛ Testing commit 8637b4b with merge 11d4708...

bors added a commit that referenced this pull request Jun 18, 2016
Removed unused E0406 and unused functions

Fixes #34301.

It removes the unused E0406 and also unused functions.

cc @eddyb
@bors bors merged commit 8637b4b into rust-lang:master Jun 18, 2016
@GuillaumeGomez GuillaumeGomez deleted the E0406 branch June 18, 2016 21:03
bors added a commit that referenced this pull request Jun 23, 2016
Modified E0220 to show error messages for more general cases

This PR extends `E0220`'s description to explain more cases.
Refer to [#34342](#34342) for more.
r? @GuillaumeGomez
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.

6 participants