-
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
rustdoc: Remove OpaqueTy #127276
rustdoc: Remove OpaqueTy #127276
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.
I love when code can just be removed. :)
Good catch! Youp, it's fine since we don't care about the internal opaque items, we just care about the opaque types. |
b20368b
to
024fd76
Compare
src/rustdoc-json-types/lib.rs
Outdated
@@ -8,7 +8,7 @@ use serde::{Deserialize, Serialize}; | |||
use std::path::PathBuf; | |||
|
|||
/// rustdoc format-version. | |||
pub const FORMAT_VERSION: u32 = 30; | |||
pub const FORMAT_VERSION: u32 = 31; |
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 shouldn't me merged until after #127289, as they both bump the version
@@ -52,7 +52,7 @@ pub(crate) enum ItemType { | |||
AssocConst = 19, | |||
Union = 20, | |||
ForeignType = 21, | |||
OpaqueTy = 22, | |||
// OpaqueTy used to be here, but it was removed in #127276 |
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.
CC @notriddle, as this is part of the rustdoc-the-binary<->rustdoc-search boundry
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.
Should be fine. The "existential" names aren't doing anything, and can probably be replaced with empty strings.
rust/src/librustdoc/html/static/js/search.js
Lines 19 to 78 in 2b90614
// This mapping table should match the discriminants of | |
// `rustdoc::formats::item_type::ItemType` type in Rust. | |
const itemTypes = [ | |
"keyword", | |
"primitive", | |
"mod", | |
"externcrate", | |
"import", | |
"struct", // 5 | |
"enum", | |
"fn", | |
"type", | |
"static", | |
"trait", // 10 | |
"impl", | |
"tymethod", | |
"method", | |
"structfield", | |
"variant", // 15 | |
"macro", | |
"associatedtype", | |
"constant", | |
"associatedconstant", | |
"union", // 20 | |
"foreigntype", | |
"existential", | |
"attr", | |
"derive", | |
"traitalias", // 25 | |
"generic", | |
]; | |
const longItemTypes = [ | |
"keyword", | |
"primitive type", | |
"module", | |
"extern crate", | |
"re-export", | |
"struct", | |
"enum", | |
"function", | |
"type alias", | |
"static", | |
"trait", | |
"", | |
"trait method", | |
"method", | |
"struct field", | |
"enum variant", | |
"macro", | |
"assoc type", | |
"constant", | |
"assoc const", | |
"union", | |
"foreign type", | |
"existential type", | |
"attribute macro", | |
"derive macro", | |
"trait alias", | |
]; |
Some changes occurred in src/librustdoc/clean/types.rs cc @camelid rustdoc-json-types is a public (although nightly-only) API. If possible, consider changing |
r? @camelid |
8e21be7
to
7c76747
Compare
Awesome find, thanks! @bors r+ rollup |
rustdoc: Remove OpaqueTy r? `@ghost` Apparently this works lol?!?
Rollup of 12 pull requests Successful merges: - rust-lang#113128 (Support tail calls in mir via `TerminatorKind::TailCall`) - rust-lang#126841 ([`macro_metavar_expr_concat`] Add support for literals) - rust-lang#126881 (Make `NEVER_TYPE_FALLBACK_FLOWING_INTO_UNSAFE` a deny-by-default lint in edition 2024) - rust-lang#126921 (Give VaList its own home) - rust-lang#127276 (rustdoc: Remove OpaqueTy) - rust-lang#127367 (Run alloc sync tests) - rust-lang#127431 (Use field ident spans directly instead of the full field span in diagnostics on local fields) - rust-lang#127437 (Uplift trait ref is knowable into `rustc_next_trait_solver`) - rust-lang#127439 (Uplift elaboration into `rustc_type_ir`) - rust-lang#127451 (Improve `run-make/output-type-permutations` code and improve `filename_not_in_denylist` API) - rust-lang#127452 (Fix intrinsic const parameter counting with `effects`) - rust-lang#127459 (rustdoc-json: add type/trait alias tests) r? `@ghost` `@rustbot` modify labels: rollup
This PR looks suspicious to me as the cause of failure in #127475 (comment). Feel free to re-approve if this PR is not the cause. @bors r- |
@bors try |
rustdoc: Remove OpaqueTy r? `@ghost` Apparently this works lol?!? try-job: aarch64-apple
ICE message
|
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.
Thanks again!
r=me with conflicts fixed |
f29bc7a
to
408b70b
Compare
408b70b
to
73ac5e0
Compare
@bors try |
rustdoc: Remove OpaqueTy r? `@ghost` Apparently this works lol?!? try-job: aarch64-apple
☀️ Try build successful - checks-actions |
@bors r=camelid |
rustdoc: Remove OpaqueTy r? `@ghost` Apparently this works lol?!? try-job: aarch64-apple
Rollup of 5 pull requests Successful merges: - rust-lang#127276 (rustdoc: Remove OpaqueTy) - rust-lang#128404 (Revert recent changes to dead code analysis) - rust-lang#128466 (Update the stdarch submodule) - rust-lang#128483 (Still more `cfg` cleanups) - rust-lang#128494 (MIR required_consts, mentioned_items: ensure we do not forget to fill these lists) r? `@ghost` `@rustbot` modify labels: rollup
☀️ Test successful - checks-actions |
…melid rustdoc: Remove dead opaque_tys rendering logic rust-lang#127276 removed OpaqueTy from clean, and the code populating AllTypes::opaque_tys, but not this field itself.
Rollup merge of rust-lang#128521 - aDotInTheVoid:opaque-fallout, r=camelid rustdoc: Remove dead opaque_tys rendering logic rust-lang#127276 removed OpaqueTy from clean, and the code populating AllTypes::opaque_tys, but not this field itself.
Finished benchmarking commit (8e86c95): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results (primary 2.3%, secondary 2.6%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 759.172s -> 758.235s (-0.12%) |
r? @ghost
Apparently this works lol?!?
try-job: aarch64-apple