Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
63fbeaab68
214 changed files with 314 additions and 270 deletions
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
|
||||
#![warn(clippy::absurd_extreme_comparisons)]
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
|
||||
#[warn(clippy::approx_constant)]
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
|
||||
#![warn(clippy::integer_arithmetic, clippy::float_arithmetic)]
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
#[allow(dead_code, unused_assignments)]
|
||||
#[warn(clippy::assign_op_pattern)]
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
|
||||
#[allow(unused_assignments)]
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
|
||||
#![warn(clippy::inline_always, clippy::deprecated_semver)]
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
|
||||
const THREE_BITS : i64 = 7;
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
|
||||
#![allow(dead_code, clippy::similar_names, clippy::single_match, clippy::toplevel_ref_arg, unused_mut, unused_variables)]
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
|
||||
#![warn(clippy::block_in_if_condition_expr)]
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
|
||||
#[warn(clippy::bool_comparison)]
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
#![warn(clippy::nonminimal_bool, clippy::logic_bug)]
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
|
||||
#![deny(clippy::borrowed_box)]
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
|
||||
#![warn(clippy::all)]
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
#![warn(clippy::builtin_type_shadow)]
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
|
||||
#[deny(clippy::naive_bytecount)]
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
|
||||
#[warn(clippy::cast_precision_loss, clippy::cast_possible_truncation, clippy::cast_sign_loss, clippy::cast_possible_wrap, clippy::cast_lossless)]
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
//! Test casts for alignment issues
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
#[warn(clippy::cast_lossless)]
|
||||
#[allow(clippy::no_effect, clippy::unnecessary_operation)]
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
#[warn(clippy::cast_lossless)]
|
||||
#[allow(clippy::no_effect, clippy::unnecessary_operation)]
|
||||
fn main() {
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
#[warn(clippy::cast_precision_loss, clippy::cast_possible_truncation, clippy::cast_sign_loss, clippy::cast_possible_wrap, clippy::cast_lossless)]
|
||||
#[allow(clippy::no_effect, clippy::unnecessary_operation)]
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
|
||||
#![warn(clippy::char_lit_as_u8)]
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
#![deny(clippy::panicking_unwrap, clippy::unnecessary_unwrap)]
|
||||
#![allow(clippy::if_same_then_else)]
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
pub fn dec_read_dec(i: &mut i32) -> i32 {
|
||||
*i -= 1;
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
|
||||
#[warn(clippy::cmp_nan)]
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
#![warn(clippy::cmp_null)]
|
||||
#![allow(unused_mut)]
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
|
||||
#[warn(clippy::cmp_owned)]
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
|
||||
#[warn(clippy::collapsible_if)]
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
#![warn(clippy::all)]
|
||||
#![allow(unused, clippy::needless_pass_by_value)]
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
#![allow(clippy::blacklisted_name, clippy::collapsible_if, clippy::cyclomatic_complexity, clippy::eq_op, clippy::needless_continue,
|
||||
clippy::needless_return, clippy::never_loop, clippy::no_effect, clippy::zero_divided_by_zero)]
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
#![warn(clippy::copy_iterator)]
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
fn main() {}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
#![allow(clippy::all)]
|
||||
#![warn(clippy::cyclomatic_complexity)]
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
#![warn(clippy::cyclomatic_complexity)]
|
||||
#![warn(unused)]
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
|
||||
#[warn(clippy::decimal_literal_representation)]
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
#![warn(clippy::default_trait_access)]
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
#![feature(untagged_unions)]
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
#![feature(never_type)]
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
#![feature(alloc)]
|
||||
#![feature(associated_type_defaults)]
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
//! This file tests for the DOC_MARKDOWN lint
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
|
||||
#[warn(clippy::double_neg)]
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
|
||||
#![warn(clippy::double_parens)]
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
|
||||
#![warn(clippy::drop_copy, clippy::forget_copy)]
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
|
||||
#![warn(clippy::drop_ref, clippy::forget_ref)]
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
|
||||
#![warn(clippy::duplicate_underscore_argument)]
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
#![warn(clippy::duration_subsec)]
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
#![warn(clippy::all)]
|
||||
#![warn(clippy::else_if_without_else)]
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
|
||||
#![allow(dead_code)]
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
#![warn(clippy::empty_line_after_outer_attr)]
|
||||
|
||||
// This should produce a warning
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
#![allow(unused, clippy::needless_pass_by_value)]
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
#![warn(clippy::all, clippy::pedantic)]
|
||||
#![allow(unused_imports, dead_code, clippy::missing_docs_in_private_items)]
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
#![feature(non_ascii_idents)]
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
// ignore-x86
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
|
||||
#[warn(clippy::eq_op)]
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
|
||||
#[allow(clippy::no_effect)]
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
#![allow(unknown_lints, unused, clippy::no_effect, clippy::redundant_closure_call, clippy::many_single_char_names, clippy::needless_pass_by_value, clippy::option_map_unit_fn, clippy::trivially_copy_pass_by_ref)]
|
||||
|
||||
#![allow(unused, clippy::no_effect, clippy::redundant_closure_call, clippy::many_single_char_names, clippy::needless_pass_by_value, clippy::option_map_unit_fn, clippy::trivially_copy_pass_by_ref)]
|
||||
#![warn(clippy::redundant_closure, clippy::needless_borrow)]
|
||||
|
||||
fn main() {
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
|
||||
#[warn(clippy::eval_order_dependence)]
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
#![warn(clippy::excessive_precision)]
|
||||
#![allow(clippy::print_literal)]
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
#![warn(clippy::explicit_write)]
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
#![deny(clippy::fallible_impl_from)]
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
|
||||
#![warn(clippy::all, clippy::pedantic)]
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
|
||||
#![warn(clippy::float_cmp)]
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
|
||||
#![warn(clippy::float_cmp_const)]
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
|
||||
// only-64bit
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
#![warn(clippy::fn_to_numeric_cast, clippy::fn_to_numeric_cast_with_truncation)]
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
|
||||
use std::collections::*;
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
#![allow(clippy::print_literal)]
|
||||
#![warn(clippy::useless_format)]
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
|
||||
#![warn(clippy::all)]
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
|
||||
#![warn(clippy::all)]
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
#![warn(clippy::default_hash_types)]
|
||||
#![feature(rustc_private)]
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
#![deny(clippy::identity_conversion)]
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
|
||||
const ONE : i64 = 1;
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
|
||||
#![warn(clippy::all)]
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
#![warn(clippy::all)]
|
||||
#![warn(clippy::if_not_else)]
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
#![allow(dead_code)]
|
||||
#![warn(clippy::multiple_inherent_impl)]
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
#[warn(clippy::inconsistent_digit_grouping)]
|
||||
#[allow(unused_variables)]
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
#![feature(plugin)]
|
||||
#![warn(clippy::indexing_slicing)]
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
#![feature(exhaustive_patterns, never_type)]
|
||||
#![allow(clippy::let_and_return)]
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
use std::iter::repeat;
|
||||
#[allow(clippy::trivially_copy_pass_by_ref)]
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
#![allow(clippy::trivially_copy_pass_by_ref)]
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
|
||||
#![warn(clippy::inline_fn_without_body)]
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
|
||||
#[allow(clippy::no_effect, clippy::unnecessary_operation)]
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
fn main() {
|
||||
let x = 1i32;
|
||||
let y = 0i32;
|
||||
|
||||
|
||||
x >= y + 1;
|
||||
y + 1 <= x;
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
|
||||
#![warn(clippy::invalid_upcast_comparisons)]
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
#![deny(clippy::while_let_on_iterator)]
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
#![warn(clippy::items_after_statements)]
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
#[warn(clippy::large_digit_groups)]
|
||||
#[allow(unused_variables)]
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
|
||||
#![allow(dead_code)]
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
#![warn(clippy::len_without_is_empty, clippy::len_zero)]
|
||||
#![allow(dead_code, unused)]
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
|
||||
#![allow(unused_variables, unused_assignments, clippy::similar_names, clippy::blacklisted_name)]
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
#![allow(unused)]
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
|
||||
#![warn(clippy::let_unit_value)]
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
|
||||
#![warn(clippy::needless_lifetimes, clippy::extra_unused_lifetimes)]
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
#![warn(clippy::mixed_case_hex_literals)]
|
||||
#![warn(clippy::unseparated_literal_suffix)]
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
#![warn(clippy::all, clippy::pedantic)]
|
||||
#![allow(clippy::missing_docs_in_private_items)]
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
#![warn(clippy::all, clippy::pedantic)]
|
||||
#![allow(clippy::missing_docs_in_private_items)]
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
#![feature(exclusive_range_pattern)]
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
#![warn(clippy::all, clippy::style, clippy::mem_replace_option_with_none)]
|
||||
|
||||
use std::mem;
|
||||
|
|
|
|||
|
|
@ -8,13 +8,13 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
|
||||
#![warn(clippy::all, clippy::pedantic, clippy::option_unwrap_used)]
|
||||
#![allow(clippy::blacklisted_name, unused, clippy::print_stdout, clippy::non_ascii_literal, clippy::new_without_default,
|
||||
clippy::new_without_default_derive, clippy::missing_docs_in_private_items, clippy::needless_pass_by_value,
|
||||
clippy::default_trait_access, clippy::use_self)]
|
||||
clippy::default_trait_access, clippy::use_self, clippy::useless_format)]
|
||||
|
||||
use std::collections::BTreeMap;
|
||||
use std::collections::HashMap;
|
||||
|
|
@ -403,6 +403,9 @@ fn expect_fun_call() {
|
|||
//Issue #2979 - this should not lint
|
||||
let msg = "bar";
|
||||
Some("foo").expect(msg);
|
||||
|
||||
Some("foo").expect({ &format!("error") });
|
||||
Some("foo").expect(format!("error").as_ref());
|
||||
}
|
||||
|
||||
/// Checks implementation of `ITER_NTH` lint
|
||||
|
|
|
|||
|
|
@ -361,7 +361,7 @@ error: use of `expect` followed by a function call
|
|||
--> $DIR/methods.rs:379:26
|
||||
|
|
||||
379 | with_none_and_as_str.expect(format!("Error {}: fake error", error_code).as_str());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| panic!(format!("Error {}: fake error", error_code).as_str()))`
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| panic!("Error {}: fake error", error_code))`
|
||||
|
||||
error: use of `expect` followed by a function call
|
||||
--> $DIR/methods.rs:389:25
|
||||
|
|
@ -373,85 +373,97 @@ error: use of `expect` followed by a function call
|
|||
--> $DIR/methods.rs:392:25
|
||||
|
|
||||
392 | with_err_and_as_str.expect(format!("Error {}: fake error", error_code).as_str());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|_| panic!(format!("Error {}: fake error", error_code).as_str()))`
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|_| panic!("Error {}: fake error", error_code))`
|
||||
|
||||
error: use of `expect` followed by a function call
|
||||
--> $DIR/methods.rs:407:17
|
||||
|
|
||||
407 | Some("foo").expect({ &format!("error") });
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| { let msg = { &format!("error") }; panic!(msg) }))`
|
||||
|
||||
error: use of `expect` followed by a function call
|
||||
--> $DIR/methods.rs:408:17
|
||||
|
|
||||
408 | Some("foo").expect(format!("error").as_ref());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| panic!("error"))`
|
||||
|
||||
error: called `.iter().nth()` on a Vec. Calling `.get()` is both faster and more readable
|
||||
--> $DIR/methods.rs:416:23
|
||||
--> $DIR/methods.rs:419:23
|
||||
|
|
||||
416 | let bad_vec = some_vec.iter().nth(3);
|
||||
419 | let bad_vec = some_vec.iter().nth(3);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: `-D clippy::iter-nth` implied by `-D warnings`
|
||||
|
||||
error: called `.iter().nth()` on a slice. Calling `.get()` is both faster and more readable
|
||||
--> $DIR/methods.rs:417:26
|
||||
--> $DIR/methods.rs:420:26
|
||||
|
|
||||
417 | let bad_slice = &some_vec[..].iter().nth(3);
|
||||
420 | let bad_slice = &some_vec[..].iter().nth(3);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: called `.iter().nth()` on a slice. Calling `.get()` is both faster and more readable
|
||||
--> $DIR/methods.rs:418:31
|
||||
--> $DIR/methods.rs:421:31
|
||||
|
|
||||
418 | let bad_boxed_slice = boxed_slice.iter().nth(3);
|
||||
421 | let bad_boxed_slice = boxed_slice.iter().nth(3);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: called `.iter().nth()` on a VecDeque. Calling `.get()` is both faster and more readable
|
||||
--> $DIR/methods.rs:419:29
|
||||
--> $DIR/methods.rs:422:29
|
||||
|
|
||||
419 | let bad_vec_deque = some_vec_deque.iter().nth(3);
|
||||
422 | let bad_vec_deque = some_vec_deque.iter().nth(3);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: called `.iter_mut().nth()` on a Vec. Calling `.get_mut()` is both faster and more readable
|
||||
--> $DIR/methods.rs:424:23
|
||||
--> $DIR/methods.rs:427:23
|
||||
|
|
||||
424 | let bad_vec = some_vec.iter_mut().nth(3);
|
||||
427 | let bad_vec = some_vec.iter_mut().nth(3);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: called `.iter_mut().nth()` on a slice. Calling `.get_mut()` is both faster and more readable
|
||||
--> $DIR/methods.rs:427:26
|
||||
--> $DIR/methods.rs:430:26
|
||||
|
|
||||
427 | let bad_slice = &some_vec[..].iter_mut().nth(3);
|
||||
430 | let bad_slice = &some_vec[..].iter_mut().nth(3);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: called `.iter_mut().nth()` on a VecDeque. Calling `.get_mut()` is both faster and more readable
|
||||
--> $DIR/methods.rs:430:29
|
||||
--> $DIR/methods.rs:433:29
|
||||
|
|
||||
430 | let bad_vec_deque = some_vec_deque.iter_mut().nth(3);
|
||||
433 | let bad_vec_deque = some_vec_deque.iter_mut().nth(3);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: called `skip(x).next()` on an iterator. This is more succinctly expressed by calling `nth(x)`
|
||||
--> $DIR/methods.rs:442:13
|
||||
--> $DIR/methods.rs:445:13
|
||||
|
|
||||
442 | let _ = some_vec.iter().skip(42).next();
|
||||
445 | let _ = some_vec.iter().skip(42).next();
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: `-D clippy::iter-skip-next` implied by `-D warnings`
|
||||
|
||||
error: called `skip(x).next()` on an iterator. This is more succinctly expressed by calling `nth(x)`
|
||||
--> $DIR/methods.rs:443:13
|
||||
--> $DIR/methods.rs:446:13
|
||||
|
|
||||
443 | let _ = some_vec.iter().cycle().skip(42).next();
|
||||
446 | let _ = some_vec.iter().cycle().skip(42).next();
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: called `skip(x).next()` on an iterator. This is more succinctly expressed by calling `nth(x)`
|
||||
--> $DIR/methods.rs:444:13
|
||||
--> $DIR/methods.rs:447:13
|
||||
|
|
||||
444 | let _ = (1..10).skip(10).next();
|
||||
447 | let _ = (1..10).skip(10).next();
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: called `skip(x).next()` on an iterator. This is more succinctly expressed by calling `nth(x)`
|
||||
--> $DIR/methods.rs:445:14
|
||||
--> $DIR/methods.rs:448:14
|
||||
|
|
||||
445 | let _ = &some_vec[..].iter().skip(3).next();
|
||||
448 | let _ = &some_vec[..].iter().skip(3).next();
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: used unwrap() on an Option value. If you don't want to handle the None case gracefully, consider using expect() to provide a better panic message
|
||||
--> $DIR/methods.rs:454:13
|
||||
--> $DIR/methods.rs:457:13
|
||||
|
|
||||
454 | let _ = opt.unwrap();
|
||||
457 | let _ = opt.unwrap();
|
||||
| ^^^^^^^^^^^^
|
||||
|
|
||||
= note: `-D clippy::option-unwrap-used` implied by `-D warnings`
|
||||
|
||||
error: aborting due to 56 previous errors
|
||||
error: aborting due to 58 previous errors
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
|
||||
#![warn(clippy::all)]
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
|
||||
#![feature(tool_lints)]
|
||||
|
||||
|
||||
/* This file incorporates work covered by the following copyright and
|
||||
* permission notice:
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue