-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error E0046 should be the last one to report #30999
Comments
I want to do it. I need a mentor. |
It seems the compiler checks whether a trait implementation is full before whether a function returns value. @shahuwang The compiler checks for syntax errors before both. To check this try code
|
cc @rust-lang/compiler @KalitaAlexey needs help implementing this |
@KalitaAlexey feel free to contact me over IRC ( |
@nikomatsakis May be some checks depend on trait impl check. I will check it. |
So I'm wondering -- rather than moving this check later, another possibility might be to try and remove the flag to abort when errors are detected. In general, we should probably do fewer such aborts. On the other hand, that's a more general change that will probably lead to a wave of ICEs as we correct the downstream code. So maybe not something we should do for now. But in general I am a bit nervous that we'll wind up with downstream type inference failures and other errors whose true cause is the lack of an associated type or something, but that cause is somewhat obscured. Already @KalitaAlexey is encountering this problem, but we'll have to see if it is readily fixable. |
The check actually runs during the "item-types checking" phase of type-checking. We added an Maybe we can allow for compilation to continue with missing methods, as they are not really used until |
In general, it seems like (for IDE support and other reasons) it'd be On Wed, Jan 20, 2016 at 01:57:37PM -0800, arielb1 wrote:
|
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.
The text was updated successfully, but these errors were encountered: