-
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
Fix errors on blanket impls by ignoring the children of generated impls #92860
Conversation
…ed implementations
Some changes occurred in cc @camelid |
r? @jsha (rust-highfive has picked a reviewer for you, use r? to override) |
@rustbot label: +A-rustdoc-json |
This comment has been minimized.
This comment has been minimized.
Can you remove the "closes" from the PR description so the issue isn't closed? Since this PR is just a temporary workaround, I'd rather leave the issue open. Other than that, I'll leave this to @jsha to review since I already have a lot of other PRs to review :) |
clean::ItemId::Auto { .. } | ||
| clean::ItemId::DefId(_) | ||
| clean::ItemId::Primitive(_, _) => false, |
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.
Why not match these all with _ => false
?
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.
When it was inside the ItemId def, it matched other methods. I figured it didn't hurt to ensure future changes required a decision on this code, as a future type may or may not want to do the same child-skipping trick until the underlying issues is fixed.
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.
If I wanted to make it non-exhaustive, I'd probably reduce the whole thing to a matches, but I'd rather leave it as-is for now personally. I'll work on fixing the underlying issues so this code shouldn't be necessary forever either way.
Looks good. I had one non-blocking comment. Feel free to fix and r=me, or just r=me without fixing if there's some reason I'm missing. |
@bors r=jsha |
📌 Commit 474e091 has been approved by |
…askrgr Rollup of 17 pull requests Successful merges: - rust-lang#91032 (Introduce drop range tracking to generator interior analysis) - rust-lang#92856 (Exclude "test" from doc_auto_cfg) - rust-lang#92860 (Fix errors on blanket impls by ignoring the children of generated impls) - rust-lang#93038 (Fix star handling in block doc comments) - rust-lang#93061 (Only suggest adding `!` to expressions that can be macro invocation) - rust-lang#93067 (rustdoc mobile: fix scroll offset when jumping to internal id) - rust-lang#93086 (Add tests to ensure that `let_chains` works with `if_let_guard`) - rust-lang#93087 (Fix src/test/run-make/raw-dylib-alt-calling-convention) - rust-lang#93091 (⬆ chalk to 0.76.0) - rust-lang#93094 (src/test/rustdoc-json: Check for `struct_field`s in `variant_tuple_struct.rs`) - rust-lang#93098 (Show a more informative panic message when `DefPathHash` does not exist) - rust-lang#93099 (rustdoc: auto create output directory when "--output-format json") - rust-lang#93102 (Pretty printer algorithm revamp step 3) - rust-lang#93104 (Support --bless for pp-exact pretty printer tests) - rust-lang#93114 (update comment for `ensure_monomorphic_enough`) - rust-lang#93128 (Add script to prevent point releases with same number as existing ones) - rust-lang#93136 (Backport the 1.58.1 release notes to master) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Related to #83718
We can safely skip the children, as they don't contain any new info, and may be subtly different for reasons hard to track down, in ways that are consistently worse than the actual generic impl.