bump syntex_* to 0.58

Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
This commit is contained in:
Igor Gnatenko 2017-02-26 15:41:32 +01:00
parent 3323056893
commit 106e011511
2 changed files with 12 additions and 5 deletions

View File

@ -23,8 +23,8 @@ regex = "0.2"
term = "0.4"
strings = "0.0.1"
diff = "0.1"
syntex_syntax = "0.56"
syntex_errors = "0.56"
syntex_syntax = "0.58"
syntex_errors = "0.58"
log = "0.3"
env_logger = "0.4"
getopts = "0.2"

View File

@ -18,7 +18,7 @@ use types::{rewrite_path, PathContext};
use super::Spanned;
use comment::FindUncommented;
use syntax::ast::{self, BindingMode, Pat, PatKind, FieldPat};
use syntax::ast::{self, BindingMode, Pat, PatKind, FieldPat, RangeEnd};
use syntax::ptr;
use syntax::codemap::{self, BytePos, Span};
@ -56,8 +56,15 @@ impl Rewrite for Pat {
None
}
}
PatKind::Range(ref lhs, ref rhs) => {
rewrite_pair(&**lhs, &**rhs, "", "...", "", context, shape)
PatKind::Range(ref lhs, ref rhs, ref end_kind) => {
match *end_kind {
RangeEnd::Included => {
rewrite_pair(&**lhs, &**rhs, "", "...", "", context, shape)
}
RangeEnd::Excluded => {
rewrite_pair(&**lhs, &**rhs, "", "..", "", context, shape)
}
}
}
PatKind::Ref(ref pat, mutability) => {
let prefix = format!("&{}", format_mutability(mutability));