Skip to content

vortex-array: param-env shadowing of object candidates #244

@lcnr

Description

@lcnr

affects vortex-array-0.53

pub trait IsSortedIteratorExt: Iterator
where
    <Self as Iterator>::Item: PartialOrd,
{}
impl<T> IsSortedIteratorExt for T
where
    T: Iterator + ?Sized,
    T::Item: PartialOrd,
{
}

fn compute_is_sorted<T: PartialOrd>() 
where
    dyn Iterator<Item = T>: IsSortedIteratorExt,
{}

fn main() {}
error[E0277]: can't compare `<(dyn Iterator<Item = T> + 'static) as Iterator>::Item` with `<(dyn Iterator<Item = T> + 'static) as Iterator>::Item`
  --> src/main.rs:14:29
   |
14 |     dyn Iterator<Item = T>: IsSortedIteratorExt,
   |                             ^^^^^^^^^^^^^^^^^^^ no implementation for `<(dyn Iterator<Item = T> + 'static) as Iterator>::Item < <(dyn Iterator<Item = T> + 'static) as Iterator>::Item` and `<(dyn Iterator<Item = T> + 'static) as Iterator>::Item > <(dyn Iterator<Item = T> + 'static) as Iterator>::Item`
   |
   = help: the trait `PartialOrd` is not implemented for `<(dyn Iterator<Item = T> + 'static) as Iterator>::Item`
note: required by a bound in `IsSortedIteratorExt`
  --> src/main.rs:3:31
   |
 1 | pub trait IsSortedIteratorExt: Iterator
   |           ------------------- required by a bound in this trait
 2 | where
 3 |     <Self as Iterator>::Item: PartialOrd,
   |                               ^^^^^^^^^^ required by this bound in `IsSortedIteratorExt`

Metadata

Metadata

Assignees

No one assigned

    Labels

    from-craterA regression found via a crater run, not part of our test suite

    Type

    No type

    Projects

    Status

    todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions