Skip to content

Nonsense "type parameter is not constrained" error after unresolved import #36836

Closed

Description

The second error in this snippet is "nonsense" because it says the type parameter N is not constrained, while the real error was already reported — the actual type could not be imported.

error[E0432]: unresolved import `graph::stable::StableGraph`
  --> src/visit.rs:27:5
   |
27 | use graph::stable::StableGraph;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ Could not find `stable` in `graph`

error[E0207]: the type parameter `N` is not constrained by the impl trait, self type, or predicates
  --> src/visit.rs:63:10
   |
63 | impl<'a, N, E: 'a, Ty, Ix> IntoNeighbors for &'a StableGraph<N, E, Ty, Ix>
   |          ^ unconstrained type parameter

Found in: rustc 1.13.0-nightly (d0623cf 2016-09-26)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions