and how about these two case:

a) fn foo<T1: Ord, Eq, Hash; T2: Ord, ::Eq> (...) {...}

b) fn foo<T1: Ord + Eq + Hash, T2: Ord + ::Eq> (...) {...}


On Sat, Jan 12, 2013 at 6:27 AM, Gareth Smith
<[email protected]>wrote:

> On 11/01/13 18:50, Niko Matsakis wrote:
>
>>
>> fn foo<T:Eq>(..) {...} // One bound is the same
>> fn foo<T:(Ord, Eq, Hash)>(...) {...} // Multiple bounds require
>> parentheses
>>
>
> How about using { ... } rather than ( ... ), like imports:
>
> use xxx::{a, b, c};
>
> fn foo<T:{Ord, Eq, Hash}>(...) { ... }
>
> I don't know that this is better but maybe it is worth considering?
>
> Gareth.
>
> ______________________________**_________________
> Rust-dev mailing list
> [email protected]
> https://mail.mozilla.org/**listinfo/rust-dev<https://mail.mozilla.org/listinfo/rust-dev>
>
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to