[The previous message got sent accidentally by gmail]

However, for performance reasons, I think some kind of trait overloading
would be nice.

i.e., you should be able to do

  impl<T> Trait<T> for A<φ> { ... }

  overload impl Trait<int> for A<φ[int/T]> {
    //...
  }

And when using (x : Trait<int>) the items in the overload impl will be used
instead of the items in the base impl (note that, except for associated
types, overloaded traits won't participate in name resolution/type checking
- so probably force associated types in the overload to be the same as the
base).
_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to