From c5b39a5917ffc0f1349b6e414fa3b874fdcf8429 Mon Sep 17 00:00:00 2001 From: Oliver Schneider Date: Thu, 19 Apr 2018 08:30:07 +0200 Subject: [PATCH] Version bump --- CHANGELOG.md | 6 +++++- Cargo.toml | 4 ++-- README.md | 2 +- clippy_lints/Cargo.toml | 2 +- clippy_lints/src/lib.rs | 6 ++++-- clippy_lints/src/regex.rs | 4 ++-- 6 files changed, 15 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d69de699968f..27420e472388e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ # Change Log All notable changes to this project will be documented in this file. +## 0.0.195 +* Rustup to *rustc 1.27.0-nightly (ac3c2288f 2018-04-18)* + ## 0.0.194 * Rustup to *rustc 1.27.0-nightly (bd40cbbe1 2018-04-14)* * New lints: [`cast_ptr_alignment`], [`transmute_ptr_to_ptr`], [`write_literal`], [`write_with_newline`], [`writeln_empty_string`] @@ -710,9 +713,9 @@ All notable changes to this project will be documented in this file. [`nonsensical_open_options`]: https://rust-lang-nursery.github.io/rust-clippy/master/index.html#nonsensical_open_options [`not_unsafe_ptr_arg_deref`]: https://rust-lang-nursery.github.io/rust-clippy/master/index.html#not_unsafe_ptr_arg_deref [`ok_expect`]: https://rust-lang-nursery.github.io/rust-clippy/master/index.html#ok_expect -[`map_unit_fn`]: https://rust-lang-nursery.github.io/rust-clippy/master/index.html#map_unit_fn [`op_ref`]: https://rust-lang-nursery.github.io/rust-clippy/master/index.html#op_ref [`option_map_or_none`]: https://rust-lang-nursery.github.io/rust-clippy/master/index.html#option_map_or_none +[`option_map_unit_fn`]: https://rust-lang-nursery.github.io/rust-clippy/master/index.html#option_map_unit_fn [`option_map_unwrap_or`]: https://rust-lang-nursery.github.io/rust-clippy/master/index.html#option_map_unwrap_or [`option_map_unwrap_or_else`]: https://rust-lang-nursery.github.io/rust-clippy/master/index.html#option_map_unwrap_or_else [`option_option`]: https://rust-lang-nursery.github.io/rust-clippy/master/index.html#option_option @@ -741,6 +744,7 @@ All notable changes to this project will be documented in this file. [`redundant_pattern`]: https://rust-lang-nursery.github.io/rust-clippy/master/index.html#redundant_pattern [`regex_macro`]: https://rust-lang-nursery.github.io/rust-clippy/master/index.html#regex_macro [`replace_consts`]: https://rust-lang-nursery.github.io/rust-clippy/master/index.html#replace_consts +[`result_map_unit_fn`]: https://rust-lang-nursery.github.io/rust-clippy/master/index.html#result_map_unit_fn [`result_map_unwrap_or_else`]: https://rust-lang-nursery.github.io/rust-clippy/master/index.html#result_map_unwrap_or_else [`result_unwrap_used`]: https://rust-lang-nursery.github.io/rust-clippy/master/index.html#result_unwrap_used [`reverse_range_loop`]: https://rust-lang-nursery.github.io/rust-clippy/master/index.html#reverse_range_loop diff --git a/Cargo.toml b/Cargo.toml index 71d22cc015e6c..9efa703100539 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "clippy" -version = "0.0.194" +version = "0.0.195" authors = [ "Manish Goregaokar ", "Andre Bogus ", @@ -37,7 +37,7 @@ path = "src/driver.rs" [dependencies] # begin automatic update -clippy_lints = { version = "0.0.194", path = "clippy_lints" } +clippy_lints = { version = "0.0.195", path = "clippy_lints" } # end automatic update regex = "0.2" semver = "0.9" diff --git a/README.md b/README.md index 0555c17fd1da4..d0ba8b0948ad0 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ A collection of lints to catch common mistakes and improve your [Rust](https://github.com/rust-lang/rust) code. -[There are 253 lints included in this crate!](https://rust-lang-nursery.github.io/rust-clippy/master/index.html) +[There are 255 lints included in this crate!](https://rust-lang-nursery.github.io/rust-clippy/master/index.html) We have a bunch of lint categories to allow you to choose how much clippy is supposed to ~~annoy~~ help you: diff --git a/clippy_lints/Cargo.toml b/clippy_lints/Cargo.toml index c74b841eb86e9..17c1c25669f05 100644 --- a/clippy_lints/Cargo.toml +++ b/clippy_lints/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "clippy_lints" # begin automatic update -version = "0.0.194" +version = "0.0.195" # end automatic update authors = [ "Manish Goregaokar ", diff --git a/clippy_lints/src/lib.rs b/clippy_lints/src/lib.rs index bdbdff92d3c35..890d7a6e22ef1 100644 --- a/clippy_lints/src/lib.rs +++ b/clippy_lints/src/lib.rs @@ -443,8 +443,6 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry) { if_not_else::IF_NOT_ELSE, infinite_iter::MAYBE_INFINITE_ITER, items_after_statements::ITEMS_AFTER_STATEMENTS, - map_unit_fn::OPTION_MAP_UNIT_FN, - map_unit_fn::RESULT_MAP_UNIT_FN, matches::SINGLE_MATCH_ELSE, methods::FILTER_MAP, methods::OPTION_MAP_UNWRAP_OR, @@ -553,6 +551,8 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry) { loops::WHILE_LET_LOOP, loops::WHILE_LET_ON_ITERATOR, map_clone::MAP_CLONE, + map_unit_fn::OPTION_MAP_UNIT_FN, + map_unit_fn::RESULT_MAP_UNIT_FN, matches::MATCH_AS_REF, matches::MATCH_BOOL, matches::MATCH_OVERLAPPING_ARM, @@ -774,6 +774,8 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry) { loops::EXPLICIT_COUNTER_LOOP, loops::MUT_RANGE_BOUND, loops::WHILE_LET_LOOP, + map_unit_fn::OPTION_MAP_UNIT_FN, + map_unit_fn::RESULT_MAP_UNIT_FN, matches::MATCH_AS_REF, methods::CHARS_NEXT_CMP, methods::CLONE_ON_COPY, diff --git a/clippy_lints/src/regex.rs b/clippy_lints/src/regex.rs index 26c1e2b244e3d..20ccc6ccfccb0 100644 --- a/clippy_lints/src/regex.rs +++ b/clippy_lints/src/regex.rs @@ -129,8 +129,8 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass { } } -fn str_span(base: Span, c: regex_syntax::ast::Span, offset: usize) -> Span { - let offset = offset as u32; +fn str_span(base: Span, c: regex_syntax::ast::Span, offset: u16) -> Span { + let offset = u32::from(offset); let end = base.lo() + BytePos(c.end.offset as u32 + offset); let start = base.lo() + BytePos(c.start.offset as u32 + offset); assert!(start <= end);