How would specialisation (if a sound implementation was ever found) prevent itself from allowing negative trait reasoning?
Rust Internals
How would specialisation (if a sound implementation was ever found) prevent itself from allowing negative trait reasoning?
from my (very limited) understanding of specialisation something like the following should be allowed by it: trait Baz {} trait Foo { fn bar(); } impl<T> Foo for T { fn bar() { // slow path } } impl<T: Baz> Foo for T { fn bar() { // fast path } } but then you could also do: type True; type False; trait Foo {} trait ImplsFoo { type Answer; } impl<T> ImplsFoo for T { // some of the specialization blog posts i read say that // specializing a ...
0 comments
No comments yet.