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

Suppress unused type parameter error when type has error field #35130

Merged
merged 1 commit into from
Aug 1, 2016

Conversation

sanxiyn
Copy link
Member

@sanxiyn sanxiyn commented Jul 30, 2016

Fix #35075.

@rust-highfive
Copy link
Collaborator

r? @nrc

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

@nrc
Copy link
Member

nrc commented Aug 1, 2016

Hmm, this seems to be the wrong fix, but maybe it is the best we can do. Ideally we would see that T is used in the field type with unknown type, rather than always assuming a type parameter is used by an error type. E.g., struct Foo<T> { bar: Bar } would still give an unused T error. I assume that we don't keep the type param info around for error types and therefore this is really hard to do? Is that right? In that case then I think we should take this PR, since I think overall it gives a better experience.

@sanxiyn
Copy link
Member Author

sanxiyn commented Aug 1, 2016

I assume that we don't keep the type param info around for error types and therefore this is really hard to do? Is that right?

Yes, this is the case.

@nrc
Copy link
Member

nrc commented Aug 1, 2016

@bors: r+

@bors
Copy link
Contributor

bors commented Aug 1, 2016

📌 Commit 0365215 has been approved by nrc

@bors
Copy link
Contributor

bors commented Aug 1, 2016

⌛ Testing commit 0365215 with merge d648a16...

bors added a commit that referenced this pull request Aug 1, 2016
Suppress unused type parameter error when type has error field

Fix #35075.
@bors bors merged commit 0365215 into rust-lang:master Aug 1, 2016
@sanxiyn sanxiyn deleted the unused-type-parameter-error branch August 1, 2016 09:03
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.

None yet

4 participants