-
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
Elide object safety errors on non-existent trait function #58929
Conversation
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.
I read the diff, but I don't quite understand why, fundamentally, we were outputting an object safety error for nonexistent methods? (It would be more elegant to just not do that in the first place, rather than save the spans of nonexistent methods and then use that to decide to not emit the object safety error at the last moment.) But if you can't see any other way to do this, then, yes, r=me
I agree, and indeed I couldn't find a more elegant way of not emitting the error in the first place. I feel this is a bit of a hack, but better than doing nothing. @bors r=zackmdavis |
📌 Commit 094f1e22fb2ca10f333e231e84620da129a85631 has been approved by |
This comment has been minimized.
This comment has been minimized.
@bors r=zackmdavis |
📌 Commit d7bb98f has been approved by |
⌛ Testing commit d7bb98f with merge f552bcb7382f870d0659cafa18213803f81e1fbe... |
💔 Test failed - checks-travis |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
@bors retry |
Elide object safety errors on non-existent trait function Fix #58734. r? @zackmdavis
☀️ Test successful - checks-travis, status-appveyor |
@@ -164,6 +164,9 @@ pub struct Session { | |||
|
|||
/// Cap lint level specified by a driver specifically. | |||
pub driver_lint_caps: FxHashMap<lint::LintId, lint::Level>, | |||
|
|||
/// `Span`s of trait methods that weren't found to avoid emitting object safety errors | |||
pub trait_methods_not_found: OneThread<RefCell<FxHashSet<Span>>>, |
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.
This is potentially used on multiple threads.
Fix #58734.
r? @zackmdavis