-
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
rustdoc: Turn JsonRenderer::mod_item_in
into unreachable!()
#84459
Conversation
src/librustdoc/json/mod.rs
Outdated
self.item(item.clone()).unwrap(); | ||
Ok(()) | ||
fn mod_item_in(&mut self, _item: &clean::Item, _module_name: &str) -> Result<(), Error> { | ||
unreachable!() | ||
} | ||
|
||
fn mod_item_out(&mut self, _item_name: &str) -> Result<(), Error> { |
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: This can also be make unreachable!
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.
Oh hmm, I think I was assuming this already had the changes from https://github.com/rust-lang/rust/pull/84458/files#diff-46f011cf734f3de35eddca150990366cc41bd8eaf3945a241b2a2f79c5bb77eaR40. Do you think it's important to add the assert given that this function gets removed altogether there? Or is it fine to have it silently do nothing? If the latter I'd prefer to leave this as-is to avoid merge conflicts.
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 think its fine to leave then, as it would be very wierd to call mod_item_out
without mod_item_in
2 Minor nits, also I cant approve because I don't have r+ rights. |
@bors delegate=aDotInTheVoid |
✌️ @aDotInTheVoid can now approve this pull request |
@bors r+ |
📌 Commit 315bfdb84868f2e72f1e13a44ed8f5a9ba367c82 has been approved by |
Thanks for the review! |
This comment has been minimized.
This comment has been minimized.
The JSON renderer no longer gets called on modules.
@bors r=aDotInTheVoid |
📌 Commit 03ace76 has been approved by |
rustdoc: Turn `JsonRenderer::mod_item_in` into `unreachable!()` The JSON renderer no longer gets called on modules (since rust-lang#83055). r? `@aDotInTheVoid`
Rollup of 8 pull requests Successful merges: - rust-lang#83519 (Implement a lint that highlights all moves larger than a configured limit) - rust-lang#84105 (stabilize `core::array::{from_ref,from_mut}` in `1.53.0`) - rust-lang#84179 (Explicitly implement `!Send` and `!Sync` for `sys::{Args, Env}`) - rust-lang#84427 (Update Clippy) - rust-lang#84459 (rustdoc: Turn `JsonRenderer::mod_item_in` into `unreachable!()`) - rust-lang#84460 (rustdoc: Remove unnecessary `is_crate` field from doctree::Module and clean::Module) - rust-lang#84464 (rustdoc: Get rid of `clean::TypeKind`) - rust-lang#84518 (Clean up DOM strings) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
The JSON renderer no longer gets called on modules (since #83055).
r? @aDotInTheVoid