-
Notifications
You must be signed in to change notification settings - Fork 925
Support ? mark in nightlies as alternative to try! #867
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
Comments
Should be behind an option until |
This is behind the |
This bump includes ability to parse inclusive ranges (`a...b`) and the question mark operator. Refs rust-lang#867, rust-lang#890
This makes method chain formatting a bit more complex. Looking into this. |
Shouldn't we format code that uses it? Or use the |
Yea, I don't think it needs to be behind an option either. |
Having written that, I realize that if we are formatting individual files, we'd also have to find the crate root to see what features are in use. I kind of lean towards just accepting it unconditionally anyway. |
Me too. |
To clarify I meant that there should be an option which changes |
Pinging that issue, @@ -57,11 +57,11 @@ impl<'a, 'tcx, 'v> Hir2Qmm<'a, 'tcx, 'v> {
for a in a {
if let ExprBinary(binop, ref lhs, ref rhs) = a.node {
if binop.node == op {
- v = self.extract(op, &[lhs, rhs], v)?;
+ v = self.extract(op, &[lhs, rhs], v)?;;
continue;
}
}
- v.push(self.run(a)?);
+ v.push(self.run(a)?));
}
Ok(v)
}
@@ -70,22 +70,22 @@ impl<'a, 'tcx, 'v> Hir2Qmm<'a, 'tcx, 'v> {
// prevent folding of `cfg!` macros and the like
if !in_macro(self.cx, e.span) {
match e.node {
- ExprUnary(UnNot, ref inner) => return Ok(Bool::Not(box self.run(inner)?)),
+ ExprUnary(UnNot, ref inner) => return Ok(Bool::Not(box self.run(inner)?))),
ExprBinary(binop, ref lhs, ref rhs) => {
match binop.node {
- BiOr => return Ok(Bool::Or(self.extract(BiOr, &[lhs, rhs], Vec::new())?)),
- BiAnd => return Ok(Bool::And(self.extract(BiAnd, &[lhs, rhs], Vec::new())?)),
- _ => {},
+ BiOr => return Ok(Bool::Or(self.extract(BiOr, &[lhs, rhs], Vec::new())?))),
+ BiAnd => return Ok(Bool::And(self.extract(BiAnd, &[lhs, rhs], Vec::new())?))), |
@marcusklaas didn’t see that PR, just tested with it, works as expected 👍 |
Closed by #893. |
No description provided.
The text was updated successfully, but these errors were encountered: