-
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
Fix auto trait impl rustdoc ice #48473
Fix auto trait impl rustdoc ice #48473
Conversation
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.
Couple of nits about comments >_>
@@ -3428,7 +3428,9 @@ fn build_deref_target_impls(cx: &DocContext, | |||
let primitive = match *target { | |||
ResolvedPath { did, .. } if did.is_local() => continue, | |||
ResolvedPath { did, .. } => { | |||
ret.extend(inline::build_impls(cx, did, true)); | |||
// We set the last parameter to false to avoid looking for auto-impls for traits | |||
// and therefore avoid an ICE. |
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 only part of the story. The real reason we should pass false
here is because auto-traits don't propagate through Deref
anyway, so we shouldn't be synthesizing impls for them.
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your | ||
// option. This file may not be copied, modified, or distributed | ||
// except according to those terms. | ||
|
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.
Can you add a comment to this test explaining why it's here, or at least referencing the issue?
87573d1
to
23dc694
Compare
Updated. |
@bors r+ rollup |
📌 Commit 23dc694 has been approved by |
…mpl-fix, r=QuietMisdreavus Fix auto trait impl rustdoc ice Fixes rust-lang#48463. r? @QuietMisdreavus
…mpl-fix, r=QuietMisdreavus Fix auto trait impl rustdoc ice Fixes rust-lang#48463. r? @QuietMisdreavus
Fixes #48463.
r? @QuietMisdreavus