0

The problem arises when implementing From trait. I understand the problem is that generic type T collides with RangeFull.

impl<T: Ord + 'static> From<RangeFull> for X<T> { ... }
impl<T: Ord + 'static> From<T> for X<T> { ... }

I was expecting the matching process as the following (like C++ template)

  1. Check input type is RangeFull if yes, matched, otherwise go 2
  2. match the most generic T
Joe Yan
  • 23
  • 5

0 Answers0