Method call reference: major rewrite by adetaylor · Pull Request #1725 · rust-lang/reference

@adetaylor

This section of the reference has been oversimplistic for some time (rust-lang#1018
and rust-lang#1534) and various rewrites have been attempted (e.g. rust-lang#1394, rust-lang#1432).
Here's another attempt!

My approach here is:
* Stop trying to keep it short and concise
* Document what actually happens in the code, step by step

This does result in a long explanation, because we're trying to document
nearly 2400 lines of code in `probe.rs`, but doing otherwise feels
as though we'll continue to run into criticisms of oversimplification.

This rewrite documents the post-arbitrary-self-types v2 situation,
i.e. it assumes rust-lang/rust#135881 has
landed. We should not merge this until or unless that lands.

This PR was inspired by discussion in rust-lang#1699. If we go ahead with this
approach, rust-lang#1699 becomes irrelevant. There was also discussion at
rust-lang/cargo#15117 (comment)

This was referenced

Jan 30, 2025

traviscross

traviscross

traviscross

This was referenced

Jan 31, 2025

traviscross

tmandry

Co-authored-by: Travis Cross <tc@traviscross.com>
Co-authored-by: Travis Cross <tc@traviscross.com>
Co-authored-by: Tyler Mandry <tmandry@gmail.com>
Co-authored-by: Tyler Mandry <tmandry@gmail.com>
Co-authored-by: Tyler Mandry <tmandry@gmail.com>

@adetaylor

Co-authored-by: Tyler Mandry <tmandry@gmail.com>

traviscross

mattheww

@adetaylor

@adetaylor

cramertj

traviscross

traviscross

traviscross

traviscross

traviscross

lcnr

tbodt