Skip to content

Conversation

@ghost
Copy link

@ghost ghost commented Jun 21, 2014

I believe there's more commonality to be found there but maybe small steps are better. I'm also in the process of documenting what I can, I will see if I can add it to this PR.

It also seems to me that ideally some of this stuff (especially the pattern sanity check) could live as a separate compiler-agnostic module but I understand this may not be the right time (if not the worst) to start the process of modularising rustc.

Copy link
Contributor

Choose a reason for hiding this comment

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

I believe there's a fn wild() in middle/check_match.rs, which is not public and can be consolidated into this one.

Copy link
Author

Choose a reason for hiding this comment

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

@edwardw Thanks, I merged them.

@brson
Copy link
Contributor

brson commented Jun 24, 2014

@pnkfelix Can you review?

@pnkfelix
Copy link
Contributor

@brson I can review, but probably not until tomorrow morning (Eastern TZ).

Copy link
Contributor

Choose a reason for hiding this comment

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

Please alpha-rename this type item to enter_pats (plural).

@pnkfelix
Copy link
Contributor

Okay it looks good to me, or at least does appear to be a plausible refactoring of the code, assuming that there is a good reason that I could not find code analogous to the original reorder-to-struct-def.

r=me after the nits regarding the enter_pat(s) callback to enter_match have been addressed.

@ghost
Copy link
Author

ghost commented Jun 25, 2014

@pnkfelix Thanks a lot for the review, I'll wait with this until #15186 is sorted.

@ghost
Copy link
Author

ghost commented Jul 3, 2014

@pnkfelix This should be green now. I added a note below that dialogue comment. I think most of it is outdated now but I'll wait with removing it until I've finished the summer cleaning here. :-)

@ghost
Copy link
Author

ghost commented Jul 3, 2014

Oh, to be fair, I also scraped the uniq_str_eq_fn lang item.

@pnkfelix
Copy link
Contributor

pnkfelix commented Jul 3, 2014

@jakub- hmm that travis failure looks relevant and troubling: "task '

' failed at 'internal error: entered unreachable code', /home/travis/build/rust-lang/rust/src/test/run-pass/vec-matching-fixed.rs:14"

The specialization logic for patterns is really the same in both
exhaustiveness/reachability checking and codegen.
@ghost
Copy link
Author

ghost commented Jul 3, 2014

@pnkfelix Yeah, I've gone a bit too far. It's green now.

bors added a commit that referenced this pull request Jul 3, 2014
…=pnkfelix

I believe there's more commonality to be found there but maybe small steps are better. I'm also in the process of documenting what I can, I will see if I can add it to this PR.

It also seems to me that ideally some of this stuff (especially the pattern sanity check) could live as a separate compiler-agnostic module but I understand this may not be the right time (if not the worst) to start the process of modularising rustc.
@bors bors closed this Jul 3, 2014
@bors bors merged commit 6b6edf4 into rust-lang:master Jul 3, 2014
@ghost ghost deleted the pattern-matching-refactor-vol-2 branch July 13, 2014 22:06
flip1995 pushed a commit to flip1995/rust that referenced this pull request Jun 26, 2025
…g#15078)

Fixes: rust-lang/rust-clippy#14980

changelog: Fix suggestion-cases-error of [`empty_line_after_outer_attr`]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants