-
Notifications
You must be signed in to change notification settings - Fork 451
Fix rustdoc nightly build: Replace doc_auto_cfg with doc_cfg #1167
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
Conversation
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
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.
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.
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 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
Hi @ia0 , I have made the updates mentioned |
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.
Changelog and version updated
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! 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
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.
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
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 a lot!
Thanks as well! |
Fixes #1166
Summary
Updates the rustdoc feature flag from the deprecated
doc_auto_cfg
todoc_cfg
.Background
The
doc_auto_cfg
feature was merged intodoc_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
src/lib.rs
line 34 to usefeature(doc_cfg)
instead offeature(doc_auto_cfg)
Testing
./test.sh
successfully