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

expand: Move some more derive logic to rustc_builtin_macros #86491

Merged
merged 2 commits into from
Jun 21, 2021

Conversation

petrochenkov
Copy link
Contributor

And cleanup some unwraps in cfg_eval.

Refactorings extracted from #83354 and #86057.
r? @Aaron1011

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 20, 2021
fn flat_map_annotatable(
vis: &mut impl MutVisitor,
annotatable: Annotatable,
) -> Option<Annotatable> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the intention that a future PR will make this method return None in some cases?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With #83354 it will return None when cfg(FALSE) is written after cfg_eval/derive.

#83354 is unlikely to be landed, but the code is simpler to read and change anyway when there's a single unwrapping point instead of many.

@Aaron1011
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Jun 20, 2021

📌 Commit d9fd5ea has been approved by Aaron1011

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 20, 2021
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Jun 21, 2021
expand: Move some more derive logic to rustc_builtin_macros

And cleanup some `unwrap`s in `cfg_eval`.

Refactorings extracted from rust-lang#83354 and rust-lang#86057.
r? `@Aaron1011`
This was referenced Jun 21, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 21, 2021
Rollup of 8 pull requests

Successful merges:

 - rust-lang#83739 (Account for bad placeholder errors on consts/statics with trait objects)
 - rust-lang#85637 (document PartialEq, PartialOrd, Ord requirements more explicitly)
 - rust-lang#86152 (Lazify is_really_default condition in the RustdocGUI bootstrap step)
 - rust-lang#86156 (Fix a bug in the linkchecker)
 - rust-lang#86427 (Updated release note)
 - rust-lang#86452 (fix panic-safety in specialized Zip::next_back)
 - rust-lang#86484 (Do not set depth to 0 in fully_expand_fragment)
 - rust-lang#86491 (expand: Move some more derive logic to rustc_builtin_macros)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 8b9e138 into rust-lang:master Jun 21, 2021
@rustbot rustbot added this to the 1.55.0 milestone Jun 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants