about summary refs log tree commit diff
path: root/compiler/rustc_incremental/src
diff options
context:
space:
mode:
authorAdrian Taylor <adetaylor@chromium.org>2024-12-19 17:00:58 +0000
committerAdrian Taylor <adetaylor@chromium.org>2024-12-20 12:29:00 +0000
commitfae72074c69c2feea0ca7a1522d201a438f2f96b (patch)
tree999615a5a2c12c3c1990f2b867255e954bcf1a7a /compiler/rustc_incremental/src
parenteedc229049b937a007a79ee6fc2801bfc484240e (diff)
downloadrust-fae72074c69c2feea0ca7a1522d201a438f2f96b.tar.gz
rust-fae72074c69c2feea0ca7a1522d201a438f2f96b.zip
Arbitrary self types v2: no deshadow pre feature.
The arbitrary self types v2 work introduces a check for shadowed
methods, whereby a method in some "outer" smart pointer type may called
in preference to a method in the inner referent. This is bad if the
outer pointer adds a method later, as it may change behavior, so we
ensure we error in this circumstance.

It was intended that this new shadowing detection system only comes into
play for users who enable the `arbitrary_self_types` feature (or of
course everyone later if it's stabilized). It was believed that the
new deshadowing code couldn't be reached without building the custom
smart pointers that `arbitrary_self_types` enables, and therefore there
was no risk of this code impacting existing users.

However, it turns out that cunning use of `Pin::get_ref` can cause
this type of shadowing error to be emitted now. This commit adds a test
for this case.
Diffstat (limited to 'compiler/rustc_incremental/src')
0 files changed, 0 insertions, 0 deletions