-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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 rendering of reexported macros 2.0 and fix visibility of reexported items #86841
Fix rendering of reexported macros 2.0 and fix visibility of reexported items #86841
Conversation
e2b3631
to
b75fa0d
Compare
Both this and #86282 basically rewrite the macro rendering, I would rather not review both at once. I plan to review the other first since it's a more serious bug. |
This comment has been minimized.
This comment has been minimized.
It's fine, let's wait until #86282 is merged! I'll mark the PR as blocked for the time being and give a try to improve the code by removing the duplication. |
b75fa0d
to
7e32bee
Compare
I unified it into a function in the end. :) |
This comment has been minimized.
This comment has been minimized.
7e32bee
to
ea5c680
Compare
Rebased on #86282. |
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.
LGTM with the nit about display_macro_source
fixed
src/librustdoc/clean/mod.rs
Outdated
Visibility::Restricted(krate) | ||
} | ||
ast::VisibilityKind::Restricted { id, .. } => { | ||
let did = cx.enter_resolver(|r| r.local_def_id(id)).to_def_id(); |
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.
It's unfortunate that this has to call into the resolver :/ I'm hoping to get rid of it at some point: #83761. But we already call load_macro_untracked
above, so hopefully fixing that will allow removing this impl at the same time.
Oh I forgot - can you add a test for |
…Gomez Remove `impl Clean for {Ident, Symbol}` These were only used once, in a place where it was trivial to replace. Also, it's unclear what 'clean' would mean for these, so it seems better to be explicit. Found while reviewing rust-lang#86841, which makes the same change to `build_macro`, so the two will conflict. r? `@GuillaumeGomez`
Adding the requested tests then. |
This comment has been minimized.
This comment has been minimized.
ea5c680
to
ba6d930
Compare
9e824b1
to
0d3d3fc
Compare
0d3d3fc
to
3137bd1
Compare
I updated the PR and the first comment as well to explain what I did here. I don't know why I expected less things to be broken around reexports... Anyway, that should clean things up quite a lot. |
3137bd1
to
74d71c2
Compare
@Stupremee Fixed the issue you spotted and added a test to prevent a regression. |
@bors: r=Stupremee |
📌 Commit 74d71c2 has been approved by |
☀️ Test successful - checks-actions |
So, this PR grew a bit out of focus, it does the following things:
macro_rules!
#86276.I added tests to check everything listed above.
cc @camelid @ollie27 (in case one of you want to review?)
r? @jyn514