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

fix: Fix coercion in match with expected type #9239

Merged
merged 1 commit into from Jun 12, 2021

Conversation

flodiebold
Copy link
Member

@flodiebold flodiebold commented Jun 12, 2021

Plus add infrastructure to test type mismatches without expect.

CC #8961

@flodiebold
Copy link
Member Author

bors r+

@flodiebold flodiebold changed the title Fix coercion in match with expected type fix: Fix coercion in match with expected type Jun 12, 2021
bors bot added a commit that referenced this pull request Jun 12, 2021
9239: fix: Fix coercion in match with expected type r=flodiebold a=flodiebold

Plus add infrastructure to test type mismatches without expect.

CC #8961

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
@bors
Copy link
Contributor

bors bot commented Jun 12, 2021

Build failed:

None => None,
};
let _: () = match () { Foo => () };
// ^^^ expected (), got Foo
Copy link
Member

Choose a reason for hiding this comment

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

😍

I wonder if, for diagnostics, we’ll end up implementing self-updating fixtures....

Plus add infrastructure to test type mismatches without expect.
@flodiebold
Copy link
Member Author

bors r+

@bors
Copy link
Contributor

bors bot commented Jun 12, 2021

@bors bors bot merged commit d6737e5 into rust-lang:master Jun 12, 2021
@flodiebold flodiebold deleted the coercion-fix branch June 12, 2021 21:38
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

2 participants