On Fri, Jun 7, 2013 at 1:12 PM, Bill Myers <[email protected]> wrote:
>
>> This would be a big step away from the advantages of Rust's current
>> trait system. Right now, if the definition of a generic function type
>> checks, it's valid for all possible types implementing the trait
>> bounds. There are no hidden or implicit requirements.
>
> Yes, but since Rust, like C++, instantiates generic functions at
> specialization time, this shouldn't be an issue. It just means that, like
> with C++ templates, compilation errors concerning the template code can
> happen at instantiation time.

The trait system is explicitly intended to avoid this issue. An error
at instantiation can happen at any depth inside function calls,
templated structs and default implementations for traits - it would be
no different than awful template errors in C++.
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to