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 a common false-positive type mismatch #3376

Merged
merged 1 commit into from Feb 29, 2020

Conversation

flodiebold
Copy link
Member

E.g. for &{ some_string() } in a context where a &str is expected, we
reported a mismatch inside the block. The problem is that we're passing an
expectation of str down, but the expectation is more of a hint in this case.
There's a long comment in rustc about this, which I just copied.

Also, fix reported location for type mismatches in macros.

E.g. for `&{ some_string() }` in a context where a `&str` is expected, we
reported a mismatch inside the block. The problem is that we're passing an
expectation of `str` down, but the expectation is more of a hint in this case.
There's a long comment in rustc about this, which I just copied.

Also, fix reported location for type mismatches in macros.
@matklad
Copy link
Member

matklad commented Feb 29, 2020

bors r+

@bors
Copy link
Contributor

bors bot commented Feb 29, 2020

@bors bors bot merged commit 0ae7054 into rust-lang:master Feb 29, 2020
@flodiebold flodiebold deleted the rvalue-hint branch February 29, 2020 16:08
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