Skip to content

Multiple max found #153

@dtolnay

Description

@dtolnay

Looks like this is related to rust-lang/rust#42496.

   Compiling petgraph v0.4.4
warning[E0122]: trait bounds are not (yet) enforced in type definitions
   --> src/algo/mod.rs:169:1
    |
169 | type DfsSpaceType<G> where G: Visitable = DfsSpace<G::NodeId, G::Map>;
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0034]: multiple applicable items in scope
   --> src/graph.rs:489:17
    |
489 |         assert!(Ix::max().index() == !0 || NodeIndex::end() != node_idx);
    |                 ^^^^^^^ multiple `max` found
    |
note: candidate #1 is defined in the trait `graph_impl::IndexType`
   --> src/graph.rs:47:5
    |
47  |     fn max() -> Self;
    |     ^^^^^^^^^^^^^^^^^
    = help: to disambiguate the method call, write `graph_impl::IndexType::max(...)` instead
note: candidate #2 is defined in the trait `std::cmp::Ord`
    = help: to disambiguate the method call, write `std::cmp::Ord::max(...)` instead

error[E0034]: multiple applicable items in scope
   --> src/graph.rs:526:17
    |
526 |         assert!(Ix::max().index() == !0 || EdgeIndex::end() != edge_idx);
    |                 ^^^^^^^ multiple `max` found
    |
note: candidate #1 is defined in the trait `graph_impl::IndexType`
   --> src/graph.rs:47:5
    |
47  |     fn max() -> Self;
    |     ^^^^^^^^^^^^^^^^^
    = help: to disambiguate the method call, write `graph_impl::IndexType::max(...)` instead
note: candidate #2 is defined in the trait `std::cmp::Ord`
    = help: to disambiguate the method call, write `std::cmp::Ord::max(...)` instead

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions