docs(rust): add missing rustdocs and remove missing_docs lint attrs#19306
docs(rust): add missing rustdocs and remove missing_docs lint attrs#19306graphite-app[bot] merged 1 commit intomainfrom
Conversation
Merge activity
|
Merging this PR will not alter performance
Comparing Footnotes
|
There was a problem hiding this comment.
Pull request overview
This PR removes missing_docs lint attributes/expectations across several crates and adds rustdoc comments to remaining public APIs (notably in oxc_transformer, oxc_isolated_declarations, and oxc_semantic). It also updates the AST kind generator template and regenerates the output so generated code no longer inserts missing_docs expectations.
Changes:
- Added rustdoc comments for many public structs/enums/methods in transformer/semantic/isolated-declarations.
- Removed
#![warn(missing_docs)],#![expect(missing_docs)], and#[expect(missing_docs)]usages in multiple crates and generated outputs. - Updated
AstKindgenerator template and regeneratedcrates/oxc_ast/src/generated/ast_kind.rs.
Reviewed changes
Copilot reviewed 56 out of 57 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tasks/ast_tools/src/generators/ast_kind.rs | Stops emitting a missing_docs expectation header in generated ast_kind.rs. |
| crates/oxc_transformer/src/typescript/options.rs | Adds rustdocs for TypeScript options and helpers. |
| crates/oxc_transformer/src/proposals/options.rs | Adds rustdoc for proposal options struct. |
| crates/oxc_transformer/src/plugins/styled_components.rs | Adds rustdoc for styled-components options. |
| crates/oxc_transformer/src/plugins/options.rs | Adds rustdocs for plugin options and fields. |
| crates/oxc_transformer/src/options/module.rs | Documents Module variants. |
| crates/oxc_transformer/src/options/mod.rs | Documents helper_loader field in TransformOptions. |
| crates/oxc_transformer/src/options/env.rs | Adds rustdocs for EnvOptions and sub-option fields. |
| crates/oxc_transformer/src/options/babel/mod.rs | Adds rustdocs for BabelOptions fields and query methods. |
| crates/oxc_transformer/src/options/babel/env/mod.rs | Adds rustdocs for BabelEnvOptions and BabelModule variants. |
| crates/oxc_transformer/src/lib.rs | Adds rustdocs for Transformer/TransformerReturn public API. |
| crates/oxc_transformer/src/jsx/options.rs | Adds rustdocs for JSX runtime/options APIs. |
| crates/oxc_transformer/src/es2026/options.rs | Adds rustdocs for ES2026 options. |
| crates/oxc_transformer/src/es2022/options.rs | Adds rustdocs for ES2022 options. |
| crates/oxc_transformer/src/es2022/class_properties/mod.rs | Adds rustdocs for class properties options. |
| crates/oxc_transformer/src/es2021/options.rs | Adds rustdocs for ES2021 options. |
| crates/oxc_transformer/src/es2020/options.rs | Adds rustdocs for ES2020 options. |
| crates/oxc_transformer/src/es2019/options.rs | Adds rustdocs for ES2019 options. |
| crates/oxc_transformer/src/es2018/options.rs | Adds rustdocs for ES2018 options. |
| crates/oxc_transformer/src/es2017/options.rs | Adds rustdocs for ES2017 options. |
| crates/oxc_transformer/src/es2016/options.rs | Adds rustdocs for ES2016 options. |
| crates/oxc_transformer/src/es2015/options.rs | Adds rustdocs for ES2015 options. |
| crates/oxc_transformer/src/es2015/arrow_functions.rs | Adds rustdocs for arrow function transform options. |
| crates/oxc_transformer/src/decorator/options.rs | Adds rustdocs for decorator options. |
| crates/oxc_transformer/src/compiler_assumptions.rs | Adds rustdocs for compiler assumption fields. |
| crates/oxc_transformer/src/common/helper_loader.rs | Adds rustdocs for helper-loader mode and Helper variants/methods. |
| crates/oxc_syntax/src/symbol.rs | Removes file-level missing_docs expectation. |
| crates/oxc_syntax/src/scope.rs | Removes file-level missing_docs expectation. |
| crates/oxc_syntax/src/reference.rs | Removes file-level missing_docs expectation. |
| crates/oxc_syntax/src/precedence.rs | Removes file-level missing_docs expectation. |
| crates/oxc_syntax/src/number.rs | Removes file-level missing_docs expectation. |
| crates/oxc_syntax/src/module_record.rs | Removes #[expect(missing_docs)] on a public trait. |
| crates/oxc_syntax/src/identifier.rs | Removes file-level missing_docs expectation. |
| crates/oxc_syntax/src/es_target.rs | Removes #[expect(missing_docs)] on ESTarget. |
| crates/oxc_syntax/src/class.rs | Removes file-level missing_docs expectation. |
| crates/oxc_str/src/lib.rs | Removes crate-level #![warn(missing_docs)]. |
| crates/oxc_str/src/ident.rs | Removes #[expect(missing_docs)] from public const idents. |
| crates/oxc_span/src/lib.rs | Removes crate-level #![warn(missing_docs)]. |
| crates/oxc_semantic/src/stats.rs | Adds rustdocs for Stats fields. |
| crates/oxc_semantic/src/scoping.rs | Adds rustdocs for multiple public Scoping APIs. |
| crates/oxc_semantic/src/node/nodes.rs | Adds rustdocs for node accessors. |
| crates/oxc_semantic/src/lib.rs | Adds rustdocs for public Semantic APIs. |
| crates/oxc_semantic/src/is_global_reference.rs | Adds rustdocs for trait methods. |
| crates/oxc_semantic/src/builder.rs | Adds rustdocs for builder return/new APIs. |
| crates/oxc_parser/src/lib.rs | Removes crate-level #![warn(missing_docs)]. |
| crates/oxc_macros/src/lib.rs | Removes crate-level #![warn(missing_docs)]. |
| crates/oxc_isolated_declarations/src/lib.rs | Adds rustdocs for options/return/transformer APIs. |
| crates/oxc_isolated_declarations/src/enum.rs | Adds rustdoc for enum transform method. |
| crates/oxc_data_structures/src/lib.rs | Removes crate-level #![warn(missing_docs)]. |
| crates/oxc_codegen/src/lib.rs | Removes crate-level #![warn(missing_docs)]. |
| crates/oxc_ast/src/lib.rs | Removes crate-level #![warn(missing_docs)]. |
| crates/oxc_ast/src/generated/ast_kind.rs | Regenerated output without missing_docs expectation header. |
| crates/oxc_ast/src/ast_impl/ts.rs | Removes crate-level #![warn(missing_docs)]. |
| crates/oxc_ast/src/ast_impl/js.rs | Removes crate-level #![warn(missing_docs)]. |
| crates/oxc_ast/src/ast_builder_impl.rs | Removes crate-level #![warn(missing_docs)]. |
| crates/oxc_ast/src/ast/comment.rs | Removes crate-level #![warn(missing_docs)]. |
| crates/oxc_allocator/src/lib.rs | Removes crate-level #![warn(missing_docs)]. |
…19306) ## Summary - add rustdoc comments for remaining public APIs in: - `oxc_transformer` - `oxc_isolated_declarations` - `oxc_semantic` - remove all `#![warn(missing_docs)]` crate attributes - remove all `#![expect(missing_docs)]` and `#[expect(missing_docs)]` attributes - update AST kind generator template and regenerate so generated code no longer reintroduces missing-doc lint expectations ## Validation - `just fmt` - `just ast` - `cargo rustc -p oxc_ast --lib -- -Dmissing-docs` - `cargo rustc -p oxc_codegen --lib -- -Dmissing-docs` - `cargo rustc -p oxc_transformer --lib -- -Dmissing-docs` - `cargo rustc -p oxc_isolated_declarations --lib -- -Dmissing-docs` - `cargo rustc -p oxc_semantic --lib -- -Dmissing-docs` - `cargo rustc -p oxc_span --lib -- -Dmissing-docs` - `cargo check -p oxc_transformer -p oxc_isolated_declarations -p oxc_semantic` - `cargo check -p oxc_ast -p oxc_syntax -p oxc_str -p oxc_parser -p oxc_codegen -p oxc_span -p oxc_allocator -p oxc_data_structures -p oxc_macros` ## AI usage disclosure This PR was prepared with AI assistance (Codex / GPT-5). I reviewed and validated the generated changes and take responsibility for the final content.
4359b74 to
569aa61
Compare
…xc-project#19306) ## Summary - add rustdoc comments for remaining public APIs in: - `oxc_transformer` - `oxc_isolated_declarations` - `oxc_semantic` - remove all `#![warn(missing_docs)]` crate attributes - remove all `#![expect(missing_docs)]` and `#[expect(missing_docs)]` attributes - update AST kind generator template and regenerate so generated code no longer reintroduces missing-doc lint expectations ## Validation - `just fmt` - `just ast` - `cargo rustc -p oxc_ast --lib -- -Dmissing-docs` - `cargo rustc -p oxc_codegen --lib -- -Dmissing-docs` - `cargo rustc -p oxc_transformer --lib -- -Dmissing-docs` - `cargo rustc -p oxc_isolated_declarations --lib -- -Dmissing-docs` - `cargo rustc -p oxc_semantic --lib -- -Dmissing-docs` - `cargo rustc -p oxc_span --lib -- -Dmissing-docs` - `cargo check -p oxc_transformer -p oxc_isolated_declarations -p oxc_semantic` - `cargo check -p oxc_ast -p oxc_syntax -p oxc_str -p oxc_parser -p oxc_codegen -p oxc_span -p oxc_allocator -p oxc_data_structures -p oxc_macros` ## AI usage disclosure This PR was prepared with AI assistance (Codex / GPT-5). I reviewed and validated the generated changes and take responsibility for the final content.
### 🚀 Features - 429d876 semantic: Assign ast node ids during semantic build (#19263) (Boshen) - ebb80b3 ast: Add `node_id` field to all AST struct nodes (#18138) (Boshen) ### 🐛 Bug Fixes - bfb15a3 semantic: Make multi_index_vec clone panic-safe (#19299) (Boshen) - 41c50a5 transformer: Ignore invalid JSX pragma identifiers (#19296) (Boshen) - deed3d8 transformer: Remove unnecessary trailing expression in object rest spread assignment (#19259) (Boshen) - 5bdaacc transformer: Propagate source spans for sourcemap correctness (#19258) (Boshen) - 3e0e5ba isolated-declarations: Align readonly class array initializer diagnostics with tsc (#19218) (camc314) ### ⚡ Performance - c169c77 syntax: Optimize `is_identifier_name_patched` (#19386) (sapphi-red) - aa1e1a8 allocator: Inline BitSet accessors (#19331) (Boshen) - 5b90d46 semantic: Improve SoA with multi index vec (#19138) (Boshen) - 99ce2a6 isolated_declarations: Mark all diagnostic functions as `#[cold]` (#19279) (camc314) - dd0220f transformer: Remove TS-only nodes earlier in `enter_statements` (#19166) (Dunqing) - e5baf60 isolated-declarations: Replace hash collections with index-based Vec (#19221) (Dunqing) ### 📚 Documentation - 569aa61 rust: Add missing rustdocs and remove missing_docs lint attrs (#19306) (Boshen)
Summary
oxc_transformeroxc_isolated_declarationsoxc_semantic#![warn(missing_docs)]crate attributes#![expect(missing_docs)]and#[expect(missing_docs)]attributesValidation
just fmtjust astcargo rustc -p oxc_ast --lib -- -Dmissing-docscargo rustc -p oxc_codegen --lib -- -Dmissing-docscargo rustc -p oxc_transformer --lib -- -Dmissing-docscargo rustc -p oxc_isolated_declarations --lib -- -Dmissing-docscargo rustc -p oxc_semantic --lib -- -Dmissing-docscargo rustc -p oxc_span --lib -- -Dmissing-docscargo check -p oxc_transformer -p oxc_isolated_declarations -p oxc_semanticcargo check -p oxc_ast -p oxc_syntax -p oxc_str -p oxc_parser -p oxc_codegen -p oxc_span -p oxc_allocator -p oxc_data_structures -p oxc_macrosAI usage disclosure
This PR was prepared with AI assistance (Codex / GPT-5). I reviewed and validated the generated changes and take responsibility for the final content.