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

Do not report cast errors if an error had been previously detected #35899

Closed
wants to merge 1 commit into from

Conversation

Detegr
Copy link
Contributor

@Detegr Detegr commented Aug 22, 2016

If InferCtxt is tainted by errors, the result of CastCheck::do_check may fail even though the cast is valid. We don't want any wrong error messages in those cases so checking is_tainted_by_errors() before reporting cast errors.

Fixes #35772.

If `InferCtxt` is tainted by errors, the result of `CastCheck::do_check`
may fail even though the cast is valid. We don't want any wrong error
messages in those cases so checking `is_tainted_by_errors()` before
reporting cast errors.

Fixes rust-lang#35772
@rust-highfive
Copy link
Collaborator

r? @pnkfelix

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

@Mark-Simulacrum
Copy link
Member

Relevant failures start here in the Travis log. Looks like quite a few of the tests actually included this error and now need to be updated.

@Detegr
Copy link
Contributor Author

Detegr commented Aug 22, 2016

I somehow manage to miss these failed tests when running make check. I did one run before making this PR and everything seemed okay. I'll see if they are just including extra errors or if my changes actually broke something.

@Detegr
Copy link
Contributor Author

Detegr commented Aug 22, 2016

Okay, it looks like my solution to the problem was a bit too simple and actually broke a bunch of relevant error messages. I'll try to think a different approach instead and reopen this PR then.

@Detegr Detegr closed this Aug 22, 2016
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