Skip to content

Bad cascading "is not a trait" error #35142

Closed
@arielb1

Description

@arielb1

Meta

$ rustc -V
rustc 1.12.0-dev (5556554e2 2016-07-31)

STR

use std::Xxx;
struct Foo;
impl Xxx for Foo {}
fn main() {}

Expected result

Single unresolved import error

Actual result

error[E0432]: unresolved import `std::Xxx`. There is no `Xxx` in `std`
 --> <anon>:1:5
  |
1 | use std::Xxx;
  |     ^^^^^^^^

error[E0404]: `Xxx` is not a trait
 --> <anon>:3:6
  |
3 | impl Xxx for Foo {}
  |      ^^^

error: cannot continue compilation due to previous error

The E0404 error is a duplicate (BTW, E0404 and E0432 should be switched ;-)).

cc @jseyfried

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lints

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions