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

Make fold_item_recur non-nullable #79310

Merged
merged 1 commit into from
Nov 24, 2020
Merged

Conversation

jyn514
Copy link
Member

@jyn514 jyn514 commented Nov 22, 2020

This gets rid of a bunch of unwrap()s and makes it a little more clear
what's going on.

Originally I wanted to make fold_item non-nullable too, which would
have been a lot nicer to work with, but unfortunately stripper does
actually return None in some places. I might make a follow-up moving
stripper to be special and not a pass so that passes can be
non-nullable.

Found while working on #76998.

This gets rid of a bunch of `unwrap()`s and makes it a little more clear
what's going on.

Originally I wanted to make `fold_item` non-nullable too, which would
have been a lot nicer to work with, but unfortunately `stripper` does
actually return `None` in some places. I might make a follow-up moving
stripper to be special and not a pass so that passes can be
non-nullable.
@jyn514 jyn514 added C-cleanup Category: PRs that clean code up or issues documenting cleanup. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Nov 22, 2020
@rust-highfive

This comment has been minimized.

@rust-highfive
Copy link
Collaborator

r? @GuillaumeGomez

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 22, 2020
@GuillaumeGomez
Copy link
Member

Thanks!

@bors: r+

@bors
Copy link
Contributor

bors commented Nov 23, 2020

📌 Commit ab1e634 has been approved by GuillaumeGomez

@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 Nov 23, 2020
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Nov 24, 2020
…meGomez

Make `fold_item_recur` non-nullable

This gets rid of a bunch of `unwrap()`s and makes it a little more clear
what's going on.

Originally I wanted to make `fold_item` non-nullable too, which would
have been a lot nicer to work with, but unfortunately `stripper` does
actually return `None` in some places. I might make a follow-up moving
stripper to be special and not a pass so that passes can be
non-nullable.

Found while working on rust-lang#76998.
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 24, 2020
…as-schievink

Rollup of 10 pull requests

Successful merges:

 - rust-lang#76858 (Add exploit mitigations chapter to the rustc book)
 - rust-lang#79310 (Make `fold_item_recur` non-nullable)
 - rust-lang#79312 (Get rid of `doctree::Impl`)
 - rust-lang#79321 (Accept '!' in intra-doc links)
 - rust-lang#79346 (Allow using `-Z fewer-names=no` to retain value names)
 - rust-lang#79351 (Fix typo in `keyword` docs for traits)
 - rust-lang#79354 (BTreeMap: cut out the ceremony around BoxedNode)
 - rust-lang#79358 (BTreeMap/BTreeSet: make public doc more consistent)
 - rust-lang#79367 (Allow disabling TrapUnreachable via -Ztrap-unreachable=no)
 - rust-lang#79374 (Add note to use nightly when using expr in const generics)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit f74b223 into rust-lang:master Nov 24, 2020
@rustbot rustbot added this to the 1.50.0 milestone Nov 24, 2020
@jyn514 jyn514 deleted the fold-item-cleanup branch November 24, 2020 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants