]> git.lizzy.rs Git - rust.git/commit
Merge #3376
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>
Sat, 29 Feb 2020 15:27:53 +0000 (15:27 +0000)
committerGitHub <noreply@github.com>
Sat, 29 Feb 2020 15:27:53 +0000 (15:27 +0000)
commit0ae7054210b0bbc48ea51c3672be640d3096cfdd
tree51599b3664e16cd5f0ef288dac924330c5cd0af0
parent0ec7f760fcd8bb9c2273e004468faa2a8cbeb29d
parent5fe220b9873d587188adae63fa205481a9aae9ce
Merge #3376

3376: Fix a common false-positive type mismatch r=matklad a=flodiebold

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.

Co-authored-by: Florian Diebold <flodiebold@gmail.com>