Skip to content

Don’t warn for types used in trait implementation #615

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
wants to merge 1 commit into from

Conversation

mcarton
Copy link
Member

@mcarton mcarton commented Feb 3, 2016

Fix #605. Ref #553.

@@ -47,27 +48,63 @@ impl LintPass for TypePass {
}

impl LateLintPass for TypePass {
fn check_ty(&mut self, cx: &LateContext, ast_ty: &Ty) {
Copy link
Member

Choose a reason for hiding this comment

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

Can we instead check the parent here using the node map?

Copy link
Member Author

Choose a reason for hiding this comment

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

I tried that but while cx.tcx.map.get_parent(ast_ty.id) does not return DUMMY_NODE_ID, cx.tcx.map.find(cx.tcx.map.get_parent(ast_ty.id)) is always None here.

Copy link
Member

Choose a reason for hiding this comment

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

You want get_parent_node here; might need more than one traversal

Copy link
Member Author

Choose a reason for hiding this comment

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

Nope, it returns the same ID here.

@llogiq
Copy link
Contributor

llogiq commented Apr 23, 2016

@mcarton @Manishearth How's the status on this PR? Is something needed or should we merge?

@llogiq
Copy link
Contributor

llogiq commented Jun 22, 2016

@mcarton @Manishearth ping?

@Manishearth
Copy link
Member

Needs a rebase, but otherwise 👍

@oli-obk
Copy link
Contributor

oli-obk commented Dec 21, 2016

closed in favour of #1393

@oli-obk oli-obk closed this Dec 21, 2016
@mcarton mcarton deleted the linkedlists branch December 21, 2016 15:19
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.

4 participants