Summary
Remove the Cargo warning emitted during documentation tests:
warning: ignoring environment variable `RUSTDOC_FLAGS`
Rationale
Makefile defines and exports RUSTDOC_FLAGS for repository-level configuration. Cargo recognizes RUSTDOCFLAGS, without an underscore between DOC and FLAGS. The doctest target runs cargo test --workspace --doc --all-features and inherits the unsupported RUSTDOC_FLAGS variable. Cargo emits the warning in the Windows CI test job.
The repository treats warnings as errors for quality gates. Remove this warning without weakening Rustdoc or compiler warning denial.
Required changes
- Update the Makefile environment-variable contract for the
doctest target.
- Ensure Cargo documentation tests receive the intended Rustdoc flags through Cargo's supported
RUSTDOCFLAGS environment variable, or prevent the unsupported RUSTDOC_FLAGS variable from reaching Cargo when it is not required.
- Preserve
-D warnings for the existing documentation and lint targets.
- Preserve caller overrides where the current Makefile contract permits them.
- Add or update focused Makefile contract coverage for the documentation-test environment contract.
Affected areas
Makefile, including RUSTDOC_FLAGS, doctest, and Rustdoc-related targets.
- Makefile contract tests under
tests/.
Acceptance criteria
make SHELL=bash doctest does not emit warning: ignoring environment variable \RUSTDOC_FLAGS`` on Windows.
- Documentation tests retain the intended Rustdoc configuration and warning-denial policy.
- Existing
lint-clippy and documentation-coverage Rustdoc invocations retain their required flags.
- A focused automated contract test prevents the unsupported variable from being passed to Cargo documentation tests.
- Run
make check-fmt, make lint, and make test.
Backlinks
Summary
Remove the Cargo warning emitted during documentation tests:
Rationale
Makefiledefines and exportsRUSTDOC_FLAGSfor repository-level configuration. Cargo recognizesRUSTDOCFLAGS, without an underscore betweenDOCandFLAGS. Thedoctesttarget runscargo test --workspace --doc --all-featuresand inherits the unsupportedRUSTDOC_FLAGSvariable. Cargo emits the warning in the Windows CI test job.The repository treats warnings as errors for quality gates. Remove this warning without weakening Rustdoc or compiler warning denial.
Required changes
doctesttarget.RUSTDOCFLAGSenvironment variable, or prevent the unsupportedRUSTDOC_FLAGSvariable from reaching Cargo when it is not required.-D warningsfor the existing documentation and lint targets.Affected areas
Makefile, includingRUSTDOC_FLAGS,doctest, and Rustdoc-related targets.tests/.Acceptance criteria
make SHELL=bash doctestdoes not emitwarning: ignoring environment variable \RUSTDOC_FLAGS`` on Windows.lint-clippyand documentation-coverage Rustdoc invocations retain their required flags.make check-fmt,make lint, andmake test.Backlinks