Skip to content

Error E0046 should be the last one to report  #30999

Closed
@shahuwang

Description

@shahuwang
struct Context;  

trait ctx{

  fn f1(&self) -> String;  

  fn f2(&self) ;

}

impl ctx for Context{ 

  fn f1(&self) -> String{

     // code here

  }

}   

During coding, I always need to run 'cargo build' to check whether it is right, but for the code above, it always report "error: not all trait items implemented, missing: f2 [E0046]
error: aborting due to previous error",

It is ok that only one or two methods of the trait that need to be implemented,but if the trait has ten methods, I have to implement all of them before I can check whether method f1 is implemented right, without syntax error.

I wish that E0046 be reported as the last one.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsA-driverArea: rustc_driver that ties everything together into the `rustc` compilerC-enhancementCategory: An issue proposing an enhancement or a PR with one.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions