about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/errors.rs
diff options
context:
space:
mode:
authorYuki Okushi <jtitor@2k36.org>2023-01-27 12:57:54 +0900
committerGitHub <noreply@github.com>2023-01-27 12:57:54 +0900
commiteb5e63e3f0144d145e85bc0677ea49b97b491896 (patch)
tree83cbe984f4a375f3351d117ff8b25ec7372eefda /compiler/rustc_parse/src/errors.rs
parentbf321ece1e5756493b1ac061cd87a48123cda52c (diff)
parentc70b7aafae283b69762ee809d6b2b5adaf0f3c43 (diff)
downloadrust-eb5e63e3f0144d145e85bc0677ea49b97b491896.tar.gz
rust-eb5e63e3f0144d145e85bc0677ea49b97b491896.zip
Rollup merge of #107171 - petrochenkov:encattrs, r=cjgillot
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.

(Noticed while implementing https://github.com/rust-lang/rust/pull/107136.)
Diffstat (limited to 'compiler/rustc_parse/src/errors.rs')
0 files changed, 0 insertions, 0 deletions