reference icon indicating copy to clipboard operation
reference copied to clipboard

How method resolution ambiguties are/aren't resolved

Open pnkfelix opened this issue 2 years ago • 0 comments

Spawned off of https://github.com/rust-lang/rust/issues/81211#issuecomment-767111563

We need better documentation of the method resolution rules, in terms of how ambiguities are resolved (to either a single method or to a method ambiguity error).

I wrote tests in PR #81294 that tried to enumerate the relevant combinations; see:

  • https://github.com/rust-lang/rust/blob/master/src/test/ui/derives/derive-Debug-use-ufcs-struct.rs
  • https://github.com/rust-lang/rust/blob/master/src/test/ui/derives/derive-Debug-use-ufcs-tuple.rs

But we still need better docs in the reference

pnkfelix avatar Nov 23 '22 17:11 pnkfelix