Skip to content
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

rustc_metadata: Fix encode_attrs #107171

Merged
merged 1 commit into from
Jan 27, 2023
Merged

rustc_metadata: Fix encode_attrs #107171

merged 1 commit into from
Jan 27, 2023

Commits on Jan 25, 2023

  1. rustc_metadata: Fix encode_attrs

    This function didn't do what the authors intended it to do.
    
    - Due to `move` in the closure `is_public` wasn't captured by mutalbe reference and wasn't used as a cache.
    - Due to iterator cloning all the `should_encode_attr` logic run for the second time to calculate `may_have_doc_links`
    
    This PR fixes these issues, and calculates all the needed attribute flags in one go.
    petrochenkov committed Jan 25, 2023
    Configuration menu
    Copy the full SHA
    c70b7aa View commit details
    Browse the repository at this point in the history