]> git.lizzy.rs Git - rust.git/commit
Only display other method receiver candidates if they actually apply
authorAaron Hill <aa1ronham@gmail.com>
Mon, 15 Jun 2020 19:15:35 +0000 (15:15 -0400)
committerAaron Hill <aa1ronham@gmail.com>
Mon, 15 Jun 2020 19:15:35 +0000 (15:15 -0400)
commit8956a7f58194b5a3a8de944ea1dc1b3b44a070ac
tree293fd67ec60f187aa97c4856e513e399e0045575
parentff4a2533a0720f9cdd86e02eafa3725f07aa7752
Only display other method receiver candidates if they actually apply

Previously, we would suggest `Box<Self>` as a valid receiver, even if
method resolution only succeeded due to an autoderef (e.g. to `&self`)
src/librustc_typeck/check/expr.rs
src/test/ui/impl-trait/no-method-suggested-traits.stderr
src/test/ui/traits/trait-item-privacy.stderr