Skip to content

Conversation

@KiChjang
Copy link
Contributor

Part of #35233.
Fixes #35212.

r? @jonathandturner

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The reason why there are so many test expectation changes is due to this line here. I realize that changing this here means that all affected error messages will have to be shown in the new format, and I haven't really touched the other ones aside from E0053.

Copy link
Contributor

Choose a reason for hiding this comment

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

I know you just did all the work to change this, but this part of the change makes me nervous. If there are other errors that will also need "expected __, found ___" changes for the label, maybe it makes sense to do all of those at once.

What does this change look like without changing this line?

Copy link
Contributor

Choose a reason for hiding this comment

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

Looking through the unit tests that changed, I think I definitely underestimated the impact changing the label would have.

For the time being it looks like we'll need to keep it as-is, until we can come up with another solution. If we removed the "expected" part, some of the labels just won't make sense or will become much more difficult to understand.

Copy link
Contributor Author

@KiChjang KiChjang Aug 17, 2016

Choose a reason for hiding this comment

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

That's totally fine (in fact, that's the whole reason why I have a separate commit removing all the "found ___" part). It does make me feel like it makes more sense to change all of them at once. Not sure if this interim state is desirable though, i.e. having the span label say "expected ___, found ____" instead of simply "expected ____".

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, changes like this in particular are what I was worried about. If we remove the found part the underline becomes very confusing.

@KiChjang
Copy link
Contributor Author

Okay, I've removed the test expectation changes and the code is now using the older format of "expected ___, found ___".

@sophiajt
Copy link
Contributor

Great! Thanks for doing that.

@bors r+

@bors
Copy link
Collaborator

bors commented Aug 17, 2016

📌 Commit 7aef7e4 has been approved by jonathandturner

@KiChjang
Copy link
Contributor Author

I needed to re-update my UI test. re-r? @jonathandturner

@sophiajt
Copy link
Contributor

@bors r+

@bors
Copy link
Collaborator

bors commented Aug 17, 2016

📌 Commit 31d56cb has been approved by jonathandturner

eddyb added a commit to eddyb/rust that referenced this pull request Aug 18, 2016
@bors bors merged commit 31d56cb into rust-lang:master Aug 18, 2016
@KiChjang KiChjang deleted the e0053-bonus branch August 18, 2016 19:22
let arg_idx = impl_iter.zip(trait_iter)
.position(|(impl_arg_ty, trait_arg_ty)| {
*impl_arg_ty == found && *trait_arg_ty == expected
}).unwrap();
Copy link
Contributor

Choose a reason for hiding this comment

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

This unwrap is probably the cause of the ICE / regression #35869.

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