Conversation
Pass the same set of flags to `RUSTFLAGS` and `RUSTDOCFLAGS`. Some of our tests - specifically `src/doctests.rs` - use `cfg`s which are set by `cargo-zerocopy`, but these were previously not passed when evaluating doc tests. This follows up on #2960, which introduced this bug. gherrit-pr-id: G413a86267ff4384a9806de9a784407f1f5be96aa
Summary of ChangesHello @joshlf, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request resolves an issue where Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request aims to fix an issue where configuration flags were not passed to doc tests. The change correctly identifies that RUSTDOCFLAGS needs to be set. However, the current implementation reuses the computed RUSTFLAGS value, which can lead to unintended side effects like overwriting a user's RUSTDOCFLAGS or passing invalid flags to rustdoc. I've provided a suggestion to make the flag handling more robust by separately constructing RUSTFLAGS and RUSTDOCFLAGS while preserving any existing values from the environment.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2987 +/- ##
=======================================
Coverage 91.87% 91.87%
=======================================
Files 20 20
Lines 6057 6057
=======================================
Hits 5565 5565
Misses 492 492 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Pass the same set of flags to
RUSTFLAGSandRUSTDOCFLAGS. Some ofour tests - specifically
src/doctests.rs- usecfgs which are set bycargo-zerocopy, but these were previously not passed when evaluatingdoc tests.
This follows up on #2960, which introduced this bug.
impl_or_verify!tests todoctests#2988RUSTDOCFLAGS#2987Latest Update: v2 — Compare vs v1
📚 Full Patch History
Links show the diff between the row version and the column version.
⬇️ Download this PR
Branch
git fetch origin refs/heads/G413a86267ff4384a9806de9a784407f1f5be96aa && git checkout -b pr-G413a86267ff4384a9806de9a784407f1f5be96aa FETCH_HEADCheckout
git fetch origin refs/heads/G413a86267ff4384a9806de9a784407f1f5be96aa && git checkout FETCH_HEADCherry Pick
git fetch origin refs/heads/G413a86267ff4384a9806de9a784407f1f5be96aa && git cherry-pick FETCH_HEADPull
Stacked PRs enabled by GHerrit.