2 ms·
If struct A implements trait S and trait T, and there are two functions fn foo(x: &S); fn foo(y: &T); in scope, then the compiler needs you to disambi
by johncolanduoni 9y ago
If struct A implements trait S and trait T, and there are two functions
fn foo(x: &S);
fn foo(y: &T);
in scope, then the compiler needs you to disambiguate foo(&a) if a: A. This isn't a whole lot different than disambiguating the same expression if the functions are:
fn foo(x: &A);
fn foo(x: &mut A);