Right… I remember not being a huge fan of your proposal of allowing any random free fn to be used as a method due to potential resolution spookiness (imagine a dual to the Arc::clone problem). What I’m proposing is a production
expr := expr '.' (path '::')? ident '(' args ')' | ...
desugaring to
<_ as path>::ident(expr, args)
This desugar is meant to indicate that path must be resolvable as a single trait (so things like ptr.Box::leak(), slice.[T]::len(), and foo.(A+B)::a_method() are all forbidden).
Also, in the process of checking this is the desugar I want, I noticed that writing <_ as $type>::foo(bar); gives a diagnostic saying foo is not a method of $type, even if it is; I expected "$type is not a trait". Is this a bug?