about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/errors.rs
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2023-01-21 23:49:23 +0400
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2023-01-25 10:08:48 +0400
commitc70b7aafae283b69762ee809d6b2b5adaf0f3c43 (patch)
tree0fdfa5e6643b3d38b814cce9176a76a67d91e4b1 /compiler/rustc_codegen_llvm/src/errors.rs
parentc8e6a9e8b6251bbc8276cb78cabe1998deecbed7 (diff)
downloadrust-c70b7aafae283b69762ee809d6b2b5adaf0f3c43.tar.gz
rust-c70b7aafae283b69762ee809d6b2b5adaf0f3c43.zip
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.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/errors.rs')
0 files changed, 0 insertions, 0 deletions