-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Return multiple object-safety violation errors and code improvements to the object-safety check #116401
Conversation
} | ||
virtual_call_violation_for_method(tcx, trait_def_id, method) | ||
.iter() | ||
.all(|v| matches!(v, MethodViolationCode::WhereClauseReferencesSelf)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for doing this, it's so much safer lol
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me with nit and doc comment fixed
None | Some(MethodViolationCode::WhereClauseReferencesSelf) => true, | ||
Some(_) => false, | ||
} | ||
virtual_call_violation_for_method(tcx, trait_def_id, method) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: make violation
plural in these functions
cedc4e1
to
ecdbefa
Compare
See individual commits for more information. Split off of #114260, since it turned out that the main intent of that PR was wrong.
r? oli-obk