Open
Description
RFC PR #132 (UFCS) had many descriptions of various paths, but completely omitted concrete examples of an actual method call (with the receiver expression and the arguments) written via the proposed notation.
In particular, assuming a trait ToStr { fn to_str(&self) -> String }
and type S
that implements ToStr
and also has its own impl S { fn to_str(&self, max: uint) -> String }
are we expecting to be able to write:
fn f(s: &S) -> String { s.ToStr::to_str() }
, orfn f(s: &S) -> String { ToStr::to_str(s) }
, or- both?
and likewise:
fn g(s: &S) -> String { s.<S>::to_str(10) }
, orfn g(s: &S) -> String { <S>::to_str(s, 10) }
, or- both?
(Perhaps the answer is implied by some other document that specifies whether method call expressions use a full path for the method name, or just an identifier and optional generics args list ::<T, U, ...>
. Nonetheless this detail is important enough to go into the document itself.)