Skip to content

Make the match arm type mismatch message point to the arm's span #14561

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 1, 2014
Merged

Make the match arm type mismatch message point to the arm's span #14561

merged 1 commit into from Jun 1, 2014

Conversation

ghost
Copy link

@ghost ghost commented May 31, 2014

Fixes #11319


match trace.origin.note_span() {
Some(span) => {
let note_str = match trace.origin {
Copy link
Member

Choose a reason for hiding this comment

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

Why is this match here?

@ghost
Copy link
Author

ghost commented May 31, 2014

@huonw Agreed. Comments addressed.

};
match note {
Some((note_span, note_str)) =>
self.tcx.sess.span_note(note_span, note_str),
Copy link
Member

Choose a reason for hiding this comment

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

Why can't this just be called directly in the trace.origin match? (It can be split into two matches later, if anything else needs a note.)

@ghost
Copy link
Author

ghost commented May 31, 2014

@huonw Addressed and squashed.

bors added a commit that referenced this pull request Jun 1, 2014
@bors bors closed this Jun 1, 2014
@bors bors merged commit b64046a into rust-lang:master Jun 1, 2014
@ghost ghost deleted the issue-11319 branch June 5, 2014 16:41
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 5, 2023
…=Veykril

feat: Map tokens from `include!` expansion to the included file

Fixes rust-lang/rust-analyzer#3767
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.

Improve error message of match arms have incompatible types
2 participants