Skip to content

Conversation

ishanrajsingh
Copy link
Contributor

Fixes #1166

Summary

Updates the rustdoc feature flag from the deprecated doc_auto_cfg to doc_cfg.

Background

The doc_auto_cfg feature was merged into doc_cfg in Rust nightly as part of RFC 3631 (rust-lang/rust#138907). The old feature name is no longer available and causes compilation errors.

Changes

  • Updated src/lib.rs line 34 to use feature(doc_cfg) instead of feature(doc_auto_cfg)

Testing

  • Verified locally by running ./test.sh successfully
  • All tests pass including doc generation

The doc_auto_cfg feature was merged into doc_cfg in Rust PR #138907
(RFC 3631). This updates the feature flag to use the new unified
doc_cfg feature instead of the removed doc_auto_cfg.

Fixes google#1166
@ishanrajsingh ishanrajsingh requested a review from ia0 as a code owner October 6, 2025 16:13
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request correctly addresses a build failure on Rust nightly by updating the deprecated doc_auto_cfg feature to doc_cfg. The change is simple, well-explained, and necessary to maintain compatibility with the latest toolchain. The fix is accurate and I see no further issues.

Copy link
Member

@ia0 ia0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! Could you update the version to 0.2.3-dev and add an appropriate entry in the Changelog? Otherwise I'll do it tomorrow.

- Bump version from 0.2.2 to 0.2.3-dev in Cargo.toml
- Add CHANGELOG.md entry for doc_auto_cfg to doc_cfg fix
- Addresses review feedback from ia0
@ishanrajsingh ishanrajsingh requested a review from ia0 October 6, 2025 16:22
@ishanrajsingh
Copy link
Contributor Author

Hi @ia0 , I have made the updates mentioned

Copy link
Contributor Author

@ishanrajsingh ishanrajsingh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changelog and version updated

Copy link
Member

@ia0 ia0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! This looks good, but technically we need to propagate the change to the CLI too, which means:

  • Change the dependency in cli/Cargo.toml to =0.2.3-dev.
  • Change the CLI version to 1.0.1-dev.
  • And update the CLI changelog with - Update dependencies as a patch-level update.

You'll also need to update the Cargo.lock files. The simplest way to do it is run ./test.sh from the rust directory.

Lib changes:
- Fix rustdoc nightly build: Replace doc_auto_cfg with doc_cfg
- Bump version from 0.2.2 to 0.2.3-dev
- Add CHANGELOG.md entry for rustdoc fix

CLI changes:
- Update magika dependency to =0.2.3-dev
- Bump CLI version from 1.0.0 to 1.0.1-dev
- Add CHANGELOG.md entry for dependency update

- Update Cargo.lock files via cargo update
- Full test suite will run in CI
- Addresses all review feedback from ia0

Fixes google#1166
@ishanrajsingh ishanrajsingh requested a review from ia0 October 6, 2025 17:04
Copy link
Contributor Author

@ishanrajsingh ishanrajsingh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lib changes:

  • Fix rustdoc nightly build: Replace doc_auto_cfg with doc_cfg
  • Bump version from 0.2.2 to 0.2.3-dev
  • Add CHANGELOG.md entry for rustdoc fix

CLI changes:

  • Update magika dependency to =0.2.3-dev

  • Bump CLI version from 1.0.0 to 1.0.1-dev

  • Add CHANGELOG.md entry for dependency update

  • Update Cargo.lock files via cargo update

  • Full test suite will run in CI

  • Addresses all review feedback from ia0

Copy link
Member

@ia0 ia0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot!

@ia0 ia0 enabled auto-merge (squash) October 6, 2025 17:50
@ishanrajsingh
Copy link
Contributor Author

Hi @reyammer , I have made the necessary changes , kindly review the pr #1167

@ia0 ia0 merged commit 2815e7b into google:main Oct 7, 2025
32 checks passed
@invernizzi
Copy link
Member

Thanks as well!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Failure in rust nightly tests

3 participants