Skip to content

Format some patterns #484

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

Merged
merged 1 commit into from
Oct 19, 2015
Merged

Format some patterns #484

merged 1 commit into from
Oct 19, 2015

Conversation

marcusklaas
Copy link
Contributor

No description provided.

@marcusklaas
Copy link
Contributor Author

This is blocked by rust-lang/rust#29141.

rewrite_path(context, Some(q_self), path, width, offset)
}
Pat_::PatRange(ref lhs, ref rhs) => {
rewrite_pair(&**lhs, &**rhs, "", "...", "", context, width, offset)
Copy link
Member

Choose a reason for hiding this comment

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

why do we need &** here and elsewhere? Do we not get auto-defered?

Copy link
Member

Choose a reason for hiding this comment

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

I'm just curious, no action required

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's not. This is because rewrite_pair takes &Rewrite, I think. If it took for example &ast::Expr, then it would auto-deref.

@nrc
Copy link
Member

nrc commented Oct 18, 2015

r+ when the rust PR lands comments addressed (I'll just go back and add actions required).

marcusklaas added a commit that referenced this pull request Oct 19, 2015
@marcusklaas marcusklaas merged commit 754925e into rust-lang:master Oct 19, 2015
@marcusklaas marcusklaas deleted the patternz branch October 19, 2015 18:20
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