4 ms·
The same thing can still happen with Deref coercions or type inference, so this is something the compiler already has to deal with.
by johncolanduoni 9y ago
The same thing can still happen with Deref coercions or type inference, so this is something the compiler already has to deal with.
- phaylon 9y agoI'm not sure what you mean. Can you give an example?
- johncolanduoni 9y agoIf 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);