]> git.lizzy.rs Git - rust.git/commit
Rollup merge of #81922 - magurotuna:issue81522, r=matthewjasper
authorDylan DPC <dylan.dpc@gmail.com>
Mon, 5 Apr 2021 11:03:36 +0000 (13:03 +0200)
committerGitHub <noreply@github.com>
Mon, 5 Apr 2021 11:03:36 +0000 (13:03 +0200)
commit54ea8e1b82a67202e64f8aac1ed57bc7b987e508
tree3a58fc584780565d66b1f88196aed568f651c358
parent58e71896506edb701f276158bd2f47e8788a1133
parent06b3636f4ed23c1ad0ed18ecc1408147ec862c1a
Rollup merge of #81922 - magurotuna:issue81522, r=matthewjasper

Let `#[allow(unstable_name_collisions)]` work for things other than function

Fixes #81522

In addition to the report in #81522, currently `#[allow(unstable_name_collisions)]` doesn't suppress the corresponding diagnostics even if this attribute is appended to an expression statement or a let statement. It seems like this is because the wrong `HirId` is passed to `struct_span_lint_hir`.
It's fixed in this PR, and a regression test for it is also added.
compiler/rustc_typeck/src/check/method/probe.rs