From 8309d1a74ca611c4879450d26b168f7c4b2638d8 Mon Sep 17 00:00:00 2001 From: Kamal Marhubi Date: Sun, 1 May 2016 23:01:46 -0400 Subject: [PATCH] deps: Update syntex_syntax to 0.32.0 --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- src/expr.rs | 2 +- src/items.rs | 6 +++--- src/utils.rs | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a31897dd455..71d4280ed93 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9,7 +9,7 @@ dependencies = [ "regex 0.1.63 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", "strings 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "syntex_syntax 0.31.0 (registry+https://github.com/rust-lang/crates.io-index)", + "syntex_syntax 0.32.0 (registry+https://github.com/rust-lang/crates.io-index)", "term 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", "toml 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-segmentation 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -111,7 +111,7 @@ dependencies = [ [[package]] name = "syntex_syntax" -version = "0.31.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/Cargo.toml b/Cargo.toml index bf719ce90ef..69ed0a108c7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,7 +21,7 @@ regex = "0.1" term = "0.4" strings = "0.0.1" diff = "0.1" -syntex_syntax = "0.31" +syntex_syntax = "0.32" log = "0.3" env_logger = "0.3" getopts = "0.2" diff --git a/src/expr.rs b/src/expr.rs index 04941c179b3..32fd5f561c3 100644 --- a/src/expr.rs +++ b/src/expr.rs @@ -145,7 +145,7 @@ impl Rewrite for ast::Expr { }; wrap_str(format!("break{}", id_str), context.config.max_width, width, offset) } - ast::ExprKind::Closure(capture, ref fn_decl, ref body) => { + ast::ExprKind::Closure(capture, ref fn_decl, ref body, _) => { rewrite_closure(capture, fn_decl, body, self.span, context, width, offset) } ast::ExprKind::Field(..) | diff --git a/src/items.rs b/src/items.rs index b1dffebbc13..f3b4d1859a1 100644 --- a/src/items.rs +++ b/src/items.rs @@ -1061,7 +1061,7 @@ pub fn rewrite_associated_type(ident: ast::Ident, let prefix = format!("type {}", ident); let type_bounds_str = if let Some(ty_param_bounds) = ty_param_bounds_opt { - let bounds: &[_] = &ty_param_bounds.as_slice(); + let bounds: &[_] = &ty_param_bounds; let bound_str = bounds.iter() .filter_map(|ty_bound| ty_bound.rewrite(context, context.config.max_width, indent)) .collect::>() @@ -1188,7 +1188,7 @@ pub fn span_hi_for_arg(arg: &ast::Arg) -> BytePos { pub fn is_named_arg(arg: &ast::Arg) -> bool { if let ast::PatKind::Ident(_, ident, _) = arg.pat.node { - ident.node != token::special_idents::invalid + ident.node != token::keywords::Invalid.ident() } else { true } @@ -1704,7 +1704,7 @@ fn rewrite_trait_bounds(context: &RewriteContext, indent: Indent, width: usize) -> Option { - let bounds: &[_] = &type_param_bounds.as_slice(); + let bounds: &[_] = &type_param_bounds; if bounds.is_empty() { return Some(String::new()); diff --git a/src/utils.rs b/src/utils.rs index b80a5783799..c7d4dd55469 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -72,7 +72,7 @@ pub fn format_visibility(vis: &Visibility) -> Option<&'static str> { Visibility::Public => Some("pub "), Visibility::Inherited => Some(""), // FIXME(#970): Handle new visibility types. - Visibility::Crate => None, + Visibility::Crate(_) => None, Visibility::Restricted { .. } => None, } }