Skip to content

_match.rs: improve enter_opt#13169

Closed
edwardw wants to merge 1 commit into
rust-lang:masterfrom
edwardw:match
Closed

_match.rs: improve enter_opt#13169
edwardw wants to merge 1 commit into
rust-lang:masterfrom
edwardw:match

Conversation

@edwardw

@edwardw edwardw commented Mar 27, 2014

Copy link
Copy Markdown
Contributor

The enter_opt needs to know whether an arm has guard function or not.
Passes in additional argument so that it can make more precise
judgement.

@edwardw

edwardw commented Mar 27, 2014

Copy link
Copy Markdown
Contributor Author

r? @nikomatsakis

This is to address Niko's concern about guarded = m.iter().any(...) in patch ##13034. The code should be more precise now and an explanatory comment therefor can be removed.

@edwardw

edwardw commented Apr 1, 2014

Copy link
Copy Markdown
Contributor Author

r? @nikomatsakis

@nikomatsakis

Copy link
Copy Markdown
Contributor

Oh yeah, sorry, I forgot about this patch. :( I don't quite understand what's going on here I'm afraid. Let me try to remember.

@edwardw edwardw closed this Apr 11, 2014
@edwardw edwardw deleted the match branch April 11, 2014 06:38
@nikomatsakis

Copy link
Copy Markdown
Contributor

@edwardw :( I'm sorry I've had such a long delay. Believe it or not, I've finally unblocked enough of my schedule to start looking at patches like this again. Do you feel that patch has bitrotted / did you lose confidence in it, or did you simply lose patience?

@edwardw edwardw reopened this Apr 15, 2014
@edwardw

edwardw commented Apr 15, 2014

Copy link
Copy Markdown
Contributor Author

Ah, I just thought this is a nice-to-have sort of thing and would be closed as inactive anyway. So here it is again. r?

@edwardw

edwardw commented Apr 22, 2014

Copy link
Copy Markdown
Contributor Author

r? @nikomatsakis

The `enter_opt` needs to know whether an arm has guard function or not.
Passes in additional argument so that it can make more precise
judgement.
@edwardw

edwardw commented May 2, 2014

Copy link
Copy Markdown
Contributor Author

Close and intend to resurrect the patch as part of the fix for #13867.

@edwardw edwardw closed this May 2, 2014
@nikomatsakis

Copy link
Copy Markdown
Contributor

On Fri, May 02, 2014 at 11:57:03AM -0700, Edward Wang wrote:

Close and intend to resurrect the patch as part of the fix for #13867.

OK. I've tried several times to grok this patch and never succeeded in
getting my head around it. :( (Mostly I think the fault lies in the
original code, which is quite opaque.) Anyway, i'd be happy to see a
more general restructuring.

@edwardw

edwardw commented May 5, 2014

Copy link
Copy Markdown
Contributor Author

This one (and #13034) has been reworked as part of #13940. You are welcome to review that one :)

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.

2 participants