Skip to content

head expression => scrutinee - #59691

Closed
Centril wants to merge 1 commit into
rust-lang:masterfrom
Centril:head-is-scrutinee
Closed

head expression => scrutinee#59691
Centril wants to merge 1 commit into
rust-lang:masterfrom
Centril:head-is-scrutinee

Conversation

@Centril

Copy link
Copy Markdown
Contributor

r? @matthewjasper

See https://doc.rust-lang.org/nightly/reference/glossary.html#scrutinee.

I believe there are uses of "discriminant" elsewhere that should be changed to "scrutinee" but that is not for this PR.

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 4, 2019
@rust-highfive

This comment has been minimized.

@matthewjasper

Copy link
Copy Markdown
Contributor

cc @rust-lang/lang

@Dylan-DPC-zz

Copy link
Copy Markdown

ping from triage @matthewjasper waiting for your review on this

Match(ref head, _) => (head, "`match` head expression", true),
IfLet(_, ref cond, ..) => (cond, "`if let` scrutinee", true),
WhileLet(_, ref cond, ..) => (cond, "`while let` scrutinee", true),
ForLoop(_, ref cond, ..) => (cond, "`for` scrutinee", true),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm not sure "scrutinee" is correct here. The obvious "iterator expression" isn't really correct either, since it only has to implement IntoIterator. I guess this is fine for now.

}
ExprKind::If(ref head_expression, ref if_block, ref optional_else) => {
visitor.visit_expr(head_expression);
ExprKind::If(ref scrutinee, ref if_block, ref optional_else) => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

For If and While this should be condition (although I guess this code is going away soon).

@bors

bors commented Apr 26, 2019

Copy link
Copy Markdown
Collaborator

☔ The latest upstream changes (presumably #60296) made this pull request unmergeable. Please resolve the merge conflicts.

@CentrilCentril closed this May 18, 2019
@Centril
Centril deleted the head-is-scrutinee branch May 18, 2019 02:51
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-reviewStatus: Awaiting review from the assignee but also interested parties.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@Centril@rust-highfive@matthewjasper@Dylan-DPC-zz@bors