From b8654eaa6c4c4abaed9b8e448445b992c87bb41e Mon Sep 17 00:00:00 2001 From: Oliver Scherer Date: Thu, 11 Oct 2018 12:16:22 +0200 Subject: [PATCH] Stabilize tool lints --- README.md | 9 ++++----- clippy_dev/src/lib.rs | 2 +- clippy_lints/src/lib.rs | 2 +- src/driver.rs | 2 +- src/lib.rs | 2 +- src/main.rs | 2 +- tests/run-pass/enum-glob-import-crate.rs | 2 +- tests/run-pass/ice-1588.rs | 2 +- tests/run-pass/ice-1969.rs | 2 +- tests/run-pass/ice-2499.rs | 2 +- tests/run-pass/ice-2760.rs | 2 +- tests/run-pass/ice-2774.rs | 2 +- tests/run-pass/ice-700.rs | 2 +- tests/run-pass/ice_exacte_size.rs | 2 +- tests/run-pass/if_same_then_else.rs | 2 +- tests/run-pass/match_same_arms_const.rs | 2 +- tests/run-pass/mut_mut_macro.rs | 2 +- tests/run-pass/needless_borrow_fp.rs | 2 +- tests/run-pass/needless_lifetimes_impl_trait.rs | 2 +- tests/run-pass/regressions.rs | 2 +- tests/run-pass/single-match-else.rs | 2 +- tests/run-pass/used_underscore_binding_macro.rs | 2 +- .../toml_blacklist/conf_french_blacklisted_name.rs | 2 +- tests/ui-toml/toml_trivially_copy/test.rs | 2 +- tests/ui/absurd-extreme-comparisons.rs | 2 +- tests/ui/approx_const.rs | 2 +- tests/ui/arithmetic.rs | 2 +- tests/ui/assign_ops.rs | 2 +- tests/ui/assign_ops2.rs | 2 +- tests/ui/attrs.rs | 2 +- tests/ui/bit_masks.rs | 2 +- tests/ui/blacklisted_name.rs | 2 +- tests/ui/block_in_if_condition.rs | 2 +- tests/ui/bool_comparison.rs | 2 +- tests/ui/booleans.rs | 2 +- tests/ui/borrow_box.rs | 2 +- tests/ui/box_vec.rs | 2 +- tests/ui/builtin-type-shadow.rs | 2 +- tests/ui/bytecount.rs | 2 +- tests/ui/cast.rs | 2 +- tests/ui/cast_alignment.rs | 2 +- tests/ui/cast_lossless_float.rs | 2 +- tests/ui/cast_lossless_integer.rs | 2 +- tests/ui/cast_size.rs | 2 +- tests/ui/char_lit_as_u8.rs | 2 +- tests/ui/checked_unwrap.rs | 2 +- tests/ui/clone_on_copy_mut.rs | 2 +- tests/ui/cmp_nan.rs | 2 +- tests/ui/cmp_null.rs | 2 +- tests/ui/cmp_owned.rs | 2 +- tests/ui/collapsible_if.rs | 2 +- tests/ui/complex_types.rs | 2 +- tests/ui/copies.rs | 2 +- tests/ui/copy_iterator.rs | 2 +- tests/ui/cstring.rs | 2 +- tests/ui/cyclomatic_complexity.rs | 2 +- tests/ui/cyclomatic_complexity_attr_used.rs | 2 +- tests/ui/decimal_literal_representation.rs | 2 +- tests/ui/default_trait_access.rs | 2 +- tests/ui/derive.rs | 2 +- tests/ui/diverging_sub_expression.rs | 2 +- tests/ui/dlist.rs | 2 +- tests/ui/doc.rs | 2 +- tests/ui/double_neg.rs | 2 +- tests/ui/double_parens.rs | 2 +- tests/ui/drop_forget_copy.rs | 2 +- tests/ui/drop_forget_ref.rs | 2 +- tests/ui/duplicate_underscore_argument.rs | 2 +- tests/ui/duration_subsec.rs | 2 +- tests/ui/else_if_without_else.rs | 2 +- tests/ui/empty_enum.rs | 2 +- tests/ui/empty_line_after_outer_attribute.rs | 2 +- tests/ui/entry.rs | 2 +- tests/ui/enum_glob_use.rs | 2 +- tests/ui/enum_variants.rs | 2 +- tests/ui/enums_clike.rs | 2 +- tests/ui/eq_op.rs | 2 +- tests/ui/erasing_op.rs | 2 +- tests/ui/eta.rs | 2 +- tests/ui/eval_order_dependence.rs | 2 +- tests/ui/excessive_precision.rs | 2 +- tests/ui/explicit_write.rs | 2 +- tests/ui/fallible_impl_from.rs | 2 +- tests/ui/filter_methods.rs | 2 +- tests/ui/float_cmp.rs | 2 +- tests/ui/float_cmp_const.rs | 2 +- tests/ui/fn_to_numeric_cast.rs | 2 +- tests/ui/for_loop.rs | 2 +- tests/ui/format.rs | 2 +- tests/ui/formatting.rs | 2 +- tests/ui/functions.rs | 2 +- tests/ui/fxhash.rs | 2 +- tests/ui/identity_conversion.rs | 2 +- tests/ui/identity_op.rs | 2 +- tests/ui/if_let_redundant_pattern_matching.rs | 2 +- tests/ui/if_not_else.rs | 2 +- tests/ui/impl.rs | 2 +- tests/ui/inconsistent_digit_grouping.rs | 2 +- tests/ui/indexing_slicing.rs | 2 +- tests/ui/infallible_destructuring_match.rs | 2 +- tests/ui/infinite_iter.rs | 2 +- tests/ui/infinite_loop.rs | 2 +- tests/ui/inline_fn_without_body.rs | 2 +- tests/ui/int_plus_one.rs | 4 ++-- tests/ui/invalid_upcast_comparisons.rs | 2 +- tests/ui/issue_2356.rs | 2 +- tests/ui/item_after_statement.rs | 2 +- tests/ui/large_digit_groups.rs | 2 +- tests/ui/large_enum_variant.rs | 2 +- tests/ui/len_zero.rs | 2 +- tests/ui/let_if_seq.rs | 2 +- tests/ui/let_return.rs | 2 +- tests/ui/let_unit.rs | 2 +- tests/ui/lifetimes.rs | 2 +- tests/ui/literals.rs | 2 +- tests/ui/map_clone.rs | 2 +- tests/ui/map_flatten.rs | 2 +- tests/ui/matches.rs | 2 +- tests/ui/mem_forget.rs | 2 +- tests/ui/mem_replace.rs | 2 +- tests/ui/methods.rs | 2 +- tests/ui/min_max.rs | 2 +- tests/ui/missing-doc.rs | 2 +- tests/ui/missing_inline.rs | 2 +- tests/ui/module_inception.rs | 2 +- tests/ui/modulo_one.rs | 2 +- tests/ui/mut_from_ref.rs | 2 +- tests/ui/mut_mut.rs | 2 +- tests/ui/mut_reference.rs | 2 +- tests/ui/mutex_atomic.rs | 2 +- tests/ui/needless_bool.rs | 2 +- tests/ui/needless_borrow.rs | 2 +- tests/ui/needless_borrowed_ref.rs | 2 +- tests/ui/needless_collect.rs | 2 +- tests/ui/needless_continue.rs | 2 +- tests/ui/needless_pass_by_value.rs | 2 +- tests/ui/needless_pass_by_value_proc_macro.rs | 2 +- tests/ui/needless_return.rs | 2 +- tests/ui/needless_update.rs | 2 +- tests/ui/neg_cmp_op_on_partial_ord.rs | 4 ++-- tests/ui/neg_multiply.rs | 2 +- tests/ui/never_loop.rs | 2 +- tests/ui/new_without_default.rs | 2 +- tests/ui/no_effect.rs | 2 +- tests/ui/non_copy_const.rs | 2 +- tests/ui/non_expressive_names.rs | 2 +- tests/ui/ok_if_let.rs | 2 +- tests/ui/op_ref.rs | 4 ++-- tests/ui/open_options.rs | 2 +- tests/ui/option_map_unit_fn.rs | 2 +- tests/ui/overflow_check_conditional.rs | 2 +- tests/ui/panic_unimplemented.rs | 2 +- tests/ui/patterns.rs | 2 +- tests/ui/precedence.rs | 2 +- tests/ui/print.rs | 2 +- tests/ui/print_literal.rs | 2 +- tests/ui/print_with_newline.rs | 2 +- tests/ui/ptr_arg.rs | 2 +- tests/ui/range.rs | 2 +- tests/ui/range_plus_minus_one.rs | 2 +- tests/ui/redundant_closure_call.rs | 2 +- tests/ui/redundant_field_names.rs | 2 +- tests/ui/reference.rs | 2 +- tests/ui/regex.rs | 2 +- tests/ui/replace_consts.rs | 2 +- tests/ui/result_map_unit_fn.rs | 2 +- tests/ui/serde.rs | 2 +- tests/ui/shadow.rs | 2 +- tests/ui/short_circuit_statement.rs | 2 +- tests/ui/single_char_pattern.rs | 2 +- tests/ui/single_match.rs | 2 +- tests/ui/starts_ends_with.rs | 2 +- tests/ui/strings.rs | 2 +- tests/ui/stutter.rs | 2 +- tests/ui/suspicious_arithmetic_impl.rs | 2 +- tests/ui/swap.rs | 2 +- tests/ui/temporary_assignment.rs | 2 +- tests/ui/toplevel_ref_arg.rs | 2 +- tests/ui/transmute.rs | 2 +- tests/ui/transmute_64bit.rs | 2 +- tests/ui/trivially_copy_pass_by_ref.rs | 2 +- tests/ui/unicode.rs | 2 +- tests/ui/unit_arg.rs | 2 +- tests/ui/unit_cmp.rs | 2 +- tests/ui/unnecessary_clone.rs | 2 +- tests/ui/unnecessary_ref.rs | 2 +- tests/ui/unneeded_field_pattern.rs | 2 +- tests/ui/unreadable_literal.rs | 2 +- tests/ui/unsafe_removed_from_name.rs | 2 +- tests/ui/unused_io_amount.rs | 2 +- tests/ui/unused_labels.rs | 2 +- tests/ui/unused_lt.rs | 2 +- tests/ui/unwrap_or.rs | 2 +- tests/ui/use_self.rs | 2 +- tests/ui/used_underscore_binding.rs | 2 +- tests/ui/useless_asref.rs | 2 +- tests/ui/useless_attribute.rs | 2 +- tests/ui/useless_attribute.stderr | 2 +- tests/ui/vec.rs | 2 +- tests/ui/while_loop.rs | 2 +- tests/ui/write_literal.rs | 2 +- tests/ui/write_with_newline.rs | 2 +- tests/ui/writeln_empty_string.rs | 2 +- tests/ui/wrong_self_convention.rs | 2 +- tests/ui/zero_div_zero.rs | 2 +- 205 files changed, 211 insertions(+), 212 deletions(-) diff --git a/README.md b/README.md index 9dd41f6513c..14a5e56cdea 100644 --- a/README.md +++ b/README.md @@ -130,16 +130,15 @@ You can add options to your code to `allow`/`warn`/`deny` Clippy lints: Note: `deny` produces errors instead of warnings. -Note: To use the new `clippy::lint_name` syntax, `#![feature(tool_lints)]` has to be activated -currently. If you want to compile your code with the stable toolchain you can use a `cfg_attr` to +Note: To use the new `clippy::lint_name` syntax, a recent compiler has to be used +currently. If you want to compile your code with the stable toolchain you can use a `cfg_attr` to activate the `tool_lints` feature: ```rust -#![cfg_attr(feature = "cargo-clippy", feature(tool_lints))] #![cfg_attr(feature = "cargo-clippy", allow(clippy::lint_name))] ``` -For this to work you have to use Clippy on the nightly toolchain: `cargo +nightly clippy`. If you -want to use Clippy with the stable toolchain, you can stick to the old unscoped method to +For this to work you have to use Clippy on the nightly toolchain: `cargo +nightly clippy`. If you +want to use Clippy with the stable toolchain, you can stick to the old unscoped method to enable/disable Clippy lints until `tool_lints` are stable: ```rust #![cfg_attr(feature = "cargo-clippy", allow(clippy_lint))] diff --git a/clippy_dev/src/lib.rs b/clippy_dev/src/lib.rs index 0e29db9bef0..eee9089e7c4 100644 --- a/clippy_dev/src/lib.rs +++ b/clippy_dev/src/lib.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![allow(clippy::default_hash_types)] use itertools::Itertools; diff --git a/clippy_lints/src/lib.rs b/clippy_lints/src/lib.rs index af69a6284f3..451374c9a47 100644 --- a/clippy_lints/src/lib.rs +++ b/clippy_lints/src/lib.rs @@ -18,7 +18,7 @@ #![allow(unknown_lints, clippy::shadow_reuse, clippy::missing_docs_in_private_items)] #![recursion_limit = "256"] #![feature(macro_at_most_once_rep)] -#![feature(tool_lints)] + #![warn(rust_2018_idioms, trivial_casts, trivial_numeric_casts)] #![feature(crate_visibility_modifier)] #![feature(try_from)] diff --git a/src/driver.rs b/src/driver.rs index 0619b3ae0d9..6af0f0be190 100644 --- a/src/driver.rs +++ b/src/driver.rs @@ -11,7 +11,7 @@ // error-pattern:yummy #![feature(box_syntax)] #![feature(rustc_private)] -#![feature(tool_lints)] + #![feature(try_from)] #![allow(unknown_lints, clippy::missing_docs_in_private_items)] diff --git a/src/lib.rs b/src/lib.rs index 58158f92e65..62c9da03278 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -11,7 +11,7 @@ // error-pattern:cargo-clippy #![feature(plugin_registrar)] #![feature(rustc_private)] -#![feature(tool_lints)] + #![allow(unknown_lints)] #![allow(clippy::missing_docs_in_private_items)] #![warn(rust_2018_idioms)] diff --git a/src/main.rs b/src/main.rs index 11c259b4d6b..efdcc42dea3 100644 --- a/src/main.rs +++ b/src/main.rs @@ -11,7 +11,7 @@ // error-pattern:yummy #![feature(box_syntax)] #![feature(rustc_private)] -#![feature(tool_lints)] + #![allow(unknown_lints, clippy::missing_docs_in_private_items)] use rustc_tools_util::*; diff --git a/tests/run-pass/enum-glob-import-crate.rs b/tests/run-pass/enum-glob-import-crate.rs index c1e1d9645d1..df8b32cde2b 100644 --- a/tests/run-pass/enum-glob-import-crate.rs +++ b/tests/run-pass/enum-glob-import-crate.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![deny(clippy::all)] #![allow(unused_imports)] diff --git a/tests/run-pass/ice-1588.rs b/tests/run-pass/ice-1588.rs index db5a6629a2b..a54c77cce73 100644 --- a/tests/run-pass/ice-1588.rs +++ b/tests/run-pass/ice-1588.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![allow(clippy::all)] diff --git a/tests/run-pass/ice-1969.rs b/tests/run-pass/ice-1969.rs index 0b4a0f4dfbf..848d9743dcd 100644 --- a/tests/run-pass/ice-1969.rs +++ b/tests/run-pass/ice-1969.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![allow(clippy::all)] diff --git a/tests/run-pass/ice-2499.rs b/tests/run-pass/ice-2499.rs index 9716e5500c7..1a973d737ba 100644 --- a/tests/run-pass/ice-2499.rs +++ b/tests/run-pass/ice-2499.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![allow(dead_code, clippy::char_lit_as_u8, clippy::needless_bool)] diff --git a/tests/run-pass/ice-2760.rs b/tests/run-pass/ice-2760.rs index ad517b84c2c..7a83094ea76 100644 --- a/tests/run-pass/ice-2760.rs +++ b/tests/run-pass/ice-2760.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![allow(unused_variables, clippy::blacklisted_name, clippy::needless_pass_by_value, dead_code)] diff --git a/tests/run-pass/ice-2774.rs b/tests/run-pass/ice-2774.rs index 6ed09a4a008..67a77340d91 100644 --- a/tests/run-pass/ice-2774.rs +++ b/tests/run-pass/ice-2774.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + use std::collections::HashSet; diff --git a/tests/run-pass/ice-700.rs b/tests/run-pass/ice-700.rs index 3252381e1fd..cb6ba21e72b 100644 --- a/tests/run-pass/ice-700.rs +++ b/tests/run-pass/ice-700.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![deny(clippy::all)] diff --git a/tests/run-pass/ice_exacte_size.rs b/tests/run-pass/ice_exacte_size.rs index 8a905a401e5..74eda792e75 100644 --- a/tests/run-pass/ice_exacte_size.rs +++ b/tests/run-pass/ice_exacte_size.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![deny(clippy::all)] diff --git a/tests/run-pass/if_same_then_else.rs b/tests/run-pass/if_same_then_else.rs index 4f0f581063a..cc95262fe3c 100644 --- a/tests/run-pass/if_same_then_else.rs +++ b/tests/run-pass/if_same_then_else.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![deny(clippy::if_same_then_else)] diff --git a/tests/run-pass/match_same_arms_const.rs b/tests/run-pass/match_same_arms_const.rs index 1e36baf059b..bd180e9cad9 100644 --- a/tests/run-pass/match_same_arms_const.rs +++ b/tests/run-pass/match_same_arms_const.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![deny(clippy::match_same_arms)] diff --git a/tests/run-pass/mut_mut_macro.rs b/tests/run-pass/mut_mut_macro.rs index afc3c9eda15..8859009479c 100644 --- a/tests/run-pass/mut_mut_macro.rs +++ b/tests/run-pass/mut_mut_macro.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![deny(clippy::mut_mut, clippy::zero_ptr, clippy::cmp_nan)] #![allow(dead_code)] diff --git a/tests/run-pass/needless_borrow_fp.rs b/tests/run-pass/needless_borrow_fp.rs index 6a70849d9ca..ad4b04864e4 100644 --- a/tests/run-pass/needless_borrow_fp.rs +++ b/tests/run-pass/needless_borrow_fp.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #[deny(clippy::all)] diff --git a/tests/run-pass/needless_lifetimes_impl_trait.rs b/tests/run-pass/needless_lifetimes_impl_trait.rs index b27bb284e21..0514d7ab008 100644 --- a/tests/run-pass/needless_lifetimes_impl_trait.rs +++ b/tests/run-pass/needless_lifetimes_impl_trait.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![deny(clippy::needless_lifetimes)] #![allow(dead_code)] diff --git a/tests/run-pass/regressions.rs b/tests/run-pass/regressions.rs index a589922218d..9be3bab185c 100644 --- a/tests/run-pass/regressions.rs +++ b/tests/run-pass/regressions.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![allow(clippy::blacklisted_name)] diff --git a/tests/run-pass/single-match-else.rs b/tests/run-pass/single-match-else.rs index 54c282451b8..cf032c65703 100644 --- a/tests/run-pass/single-match-else.rs +++ b/tests/run-pass/single-match-else.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::single_match_else)] diff --git a/tests/run-pass/used_underscore_binding_macro.rs b/tests/run-pass/used_underscore_binding_macro.rs index b700ab90a68..68bd6922062 100644 --- a/tests/run-pass/used_underscore_binding_macro.rs +++ b/tests/run-pass/used_underscore_binding_macro.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![allow(clippy::useless_attribute)] //issue #2910 diff --git a/tests/ui-toml/toml_blacklist/conf_french_blacklisted_name.rs b/tests/ui-toml/toml_blacklist/conf_french_blacklisted_name.rs index 4f0cd1659f7..ad81b82b2c5 100644 --- a/tests/ui-toml/toml_blacklist/conf_french_blacklisted_name.rs +++ b/tests/ui-toml/toml_blacklist/conf_french_blacklisted_name.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![allow(dead_code)] diff --git a/tests/ui-toml/toml_trivially_copy/test.rs b/tests/ui-toml/toml_trivially_copy/test.rs index 081dbf9b060..eb09d6dfc5c 100644 --- a/tests/ui-toml/toml_trivially_copy/test.rs +++ b/tests/ui-toml/toml_trivially_copy/test.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![allow(clippy::many_single_char_names)] #[derive(Copy, Clone)] diff --git a/tests/ui/absurd-extreme-comparisons.rs b/tests/ui/absurd-extreme-comparisons.rs index a88e57a5c43..b219cb0397b 100644 --- a/tests/ui/absurd-extreme-comparisons.rs +++ b/tests/ui/absurd-extreme-comparisons.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::absurd_extreme_comparisons)] diff --git a/tests/ui/approx_const.rs b/tests/ui/approx_const.rs index ea023b8a7a2..b2f50cc2ce3 100644 --- a/tests/ui/approx_const.rs +++ b/tests/ui/approx_const.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #[warn(clippy::approx_constant)] diff --git a/tests/ui/arithmetic.rs b/tests/ui/arithmetic.rs index a5bf8c9280e..ff550c9593c 100644 --- a/tests/ui/arithmetic.rs +++ b/tests/ui/arithmetic.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::integer_arithmetic, clippy::float_arithmetic)] diff --git a/tests/ui/assign_ops.rs b/tests/ui/assign_ops.rs index 5d791ba8f54..419e63b2c62 100644 --- a/tests/ui/assign_ops.rs +++ b/tests/ui/assign_ops.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #[allow(dead_code, unused_assignments)] #[warn(clippy::assign_op_pattern)] diff --git a/tests/ui/assign_ops2.rs b/tests/ui/assign_ops2.rs index 60a9d2fb73e..4f9fbc80aaa 100644 --- a/tests/ui/assign_ops2.rs +++ b/tests/ui/assign_ops2.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #[allow(unused_assignments)] diff --git a/tests/ui/attrs.rs b/tests/ui/attrs.rs index 9af9c0e619a..1d0c23905bd 100644 --- a/tests/ui/attrs.rs +++ b/tests/ui/attrs.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::inline_always, clippy::deprecated_semver)] diff --git a/tests/ui/bit_masks.rs b/tests/ui/bit_masks.rs index 4110f6ced85..db5a6885c9e 100644 --- a/tests/ui/bit_masks.rs +++ b/tests/ui/bit_masks.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + const THREE_BITS : i64 = 7; diff --git a/tests/ui/blacklisted_name.rs b/tests/ui/blacklisted_name.rs index be58a8fb601..285438810d9 100644 --- a/tests/ui/blacklisted_name.rs +++ b/tests/ui/blacklisted_name.rs @@ -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)] diff --git a/tests/ui/block_in_if_condition.rs b/tests/ui/block_in_if_condition.rs index 67bd778acaa..bb87315bcc4 100644 --- a/tests/ui/block_in_if_condition.rs +++ b/tests/ui/block_in_if_condition.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::block_in_if_condition_expr)] diff --git a/tests/ui/bool_comparison.rs b/tests/ui/bool_comparison.rs index 1d9756bc39b..c213414a63d 100644 --- a/tests/ui/bool_comparison.rs +++ b/tests/ui/bool_comparison.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #[warn(clippy::bool_comparison)] diff --git a/tests/ui/booleans.rs b/tests/ui/booleans.rs index 556344c77a2..962f03dc9cd 100644 --- a/tests/ui/booleans.rs +++ b/tests/ui/booleans.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::nonminimal_bool, clippy::logic_bug)] diff --git a/tests/ui/borrow_box.rs b/tests/ui/borrow_box.rs index 7c668c33c83..dbcd42a692c 100644 --- a/tests/ui/borrow_box.rs +++ b/tests/ui/borrow_box.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![deny(clippy::borrowed_box)] diff --git a/tests/ui/box_vec.rs b/tests/ui/box_vec.rs index 78174d2cd8f..bf505c85abc 100644 --- a/tests/ui/box_vec.rs +++ b/tests/ui/box_vec.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::all)] diff --git a/tests/ui/builtin-type-shadow.rs b/tests/ui/builtin-type-shadow.rs index a6d0f82a7d6..e43a2789ce1 100644 --- a/tests/ui/builtin-type-shadow.rs +++ b/tests/ui/builtin-type-shadow.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::builtin_type_shadow)] diff --git a/tests/ui/bytecount.rs b/tests/ui/bytecount.rs index 71a6e01219e..170666d1f18 100644 --- a/tests/ui/bytecount.rs +++ b/tests/ui/bytecount.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #[deny(clippy::naive_bytecount)] diff --git a/tests/ui/cast.rs b/tests/ui/cast.rs index 2fb865b12b8..9976a4aa96a 100644 --- a/tests/ui/cast.rs +++ b/tests/ui/cast.rs @@ -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)] diff --git a/tests/ui/cast_alignment.rs b/tests/ui/cast_alignment.rs index b6e01d21288..a1a2e1c9a8f 100644 --- a/tests/ui/cast_alignment.rs +++ b/tests/ui/cast_alignment.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + //! Test casts for alignment issues diff --git a/tests/ui/cast_lossless_float.rs b/tests/ui/cast_lossless_float.rs index aa78a62f88b..468774dd88b 100644 --- a/tests/ui/cast_lossless_float.rs +++ b/tests/ui/cast_lossless_float.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #[warn(clippy::cast_lossless)] #[allow(clippy::no_effect, clippy::unnecessary_operation)] diff --git a/tests/ui/cast_lossless_integer.rs b/tests/ui/cast_lossless_integer.rs index ef430d57e1e..4f7432de620 100644 --- a/tests/ui/cast_lossless_integer.rs +++ b/tests/ui/cast_lossless_integer.rs @@ -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() { diff --git a/tests/ui/cast_size.rs b/tests/ui/cast_size.rs index e8b0f4a5b82..fddf9669a8f 100644 --- a/tests/ui/cast_size.rs +++ b/tests/ui/cast_size.rs @@ -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)] diff --git a/tests/ui/char_lit_as_u8.rs b/tests/ui/char_lit_as_u8.rs index 8fda473e351..d684fcf5746 100644 --- a/tests/ui/char_lit_as_u8.rs +++ b/tests/ui/char_lit_as_u8.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::char_lit_as_u8)] diff --git a/tests/ui/checked_unwrap.rs b/tests/ui/checked_unwrap.rs index ed9651b1872..383fd82240b 100644 --- a/tests/ui/checked_unwrap.rs +++ b/tests/ui/checked_unwrap.rs @@ -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)] diff --git a/tests/ui/clone_on_copy_mut.rs b/tests/ui/clone_on_copy_mut.rs index ad37d45d36f..81d70eb9458 100644 --- a/tests/ui/clone_on_copy_mut.rs +++ b/tests/ui/clone_on_copy_mut.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + pub fn dec_read_dec(i: &mut i32) -> i32 { *i -= 1; diff --git a/tests/ui/cmp_nan.rs b/tests/ui/cmp_nan.rs index a2506f444f0..4b62d0e53f1 100644 --- a/tests/ui/cmp_nan.rs +++ b/tests/ui/cmp_nan.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #[warn(clippy::cmp_nan)] diff --git a/tests/ui/cmp_null.rs b/tests/ui/cmp_null.rs index d8214876a1b..03f0367a640 100644 --- a/tests/ui/cmp_null.rs +++ b/tests/ui/cmp_null.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::cmp_null)] #![allow(unused_mut)] diff --git a/tests/ui/cmp_owned.rs b/tests/ui/cmp_owned.rs index 031809f5df5..978e919ff43 100644 --- a/tests/ui/cmp_owned.rs +++ b/tests/ui/cmp_owned.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #[warn(clippy::cmp_owned)] diff --git a/tests/ui/collapsible_if.rs b/tests/ui/collapsible_if.rs index fa80b27f590..a6df9109df9 100644 --- a/tests/ui/collapsible_if.rs +++ b/tests/ui/collapsible_if.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #[warn(clippy::collapsible_if)] diff --git a/tests/ui/complex_types.rs b/tests/ui/complex_types.rs index 5779c9da47f..e735bf8e487 100644 --- a/tests/ui/complex_types.rs +++ b/tests/ui/complex_types.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::all)] #![allow(unused, clippy::needless_pass_by_value)] diff --git a/tests/ui/copies.rs b/tests/ui/copies.rs index 2b29e76c4e0..8d0bc802daf 100644 --- a/tests/ui/copies.rs +++ b/tests/ui/copies.rs @@ -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)] diff --git a/tests/ui/copy_iterator.rs b/tests/ui/copy_iterator.rs index 6984b612f23..b5684f183eb 100644 --- a/tests/ui/copy_iterator.rs +++ b/tests/ui/copy_iterator.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::copy_iterator)] diff --git a/tests/ui/cstring.rs b/tests/ui/cstring.rs index fd5d00059a7..6121166debe 100644 --- a/tests/ui/cstring.rs +++ b/tests/ui/cstring.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + fn main() {} diff --git a/tests/ui/cyclomatic_complexity.rs b/tests/ui/cyclomatic_complexity.rs index 3c8ab8694a6..35451a99acc 100644 --- a/tests/ui/cyclomatic_complexity.rs +++ b/tests/ui/cyclomatic_complexity.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![allow(clippy::all)] #![warn(clippy::cyclomatic_complexity)] diff --git a/tests/ui/cyclomatic_complexity_attr_used.rs b/tests/ui/cyclomatic_complexity_attr_used.rs index 1699601aa50..63d4e65a977 100644 --- a/tests/ui/cyclomatic_complexity_attr_used.rs +++ b/tests/ui/cyclomatic_complexity_attr_used.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::cyclomatic_complexity)] #![warn(unused)] diff --git a/tests/ui/decimal_literal_representation.rs b/tests/ui/decimal_literal_representation.rs index f85ccd84722..c52fcd826ca 100644 --- a/tests/ui/decimal_literal_representation.rs +++ b/tests/ui/decimal_literal_representation.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #[warn(clippy::decimal_literal_representation)] diff --git a/tests/ui/default_trait_access.rs b/tests/ui/default_trait_access.rs index d268746d765..331ad03f9a2 100644 --- a/tests/ui/default_trait_access.rs +++ b/tests/ui/default_trait_access.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::default_trait_access)] diff --git a/tests/ui/derive.rs b/tests/ui/derive.rs index c5ce42586fa..521a2e323fc 100644 --- a/tests/ui/derive.rs +++ b/tests/ui/derive.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![feature(untagged_unions)] diff --git a/tests/ui/diverging_sub_expression.rs b/tests/ui/diverging_sub_expression.rs index 9cf6f22fb27..a47c96759ac 100644 --- a/tests/ui/diverging_sub_expression.rs +++ b/tests/ui/diverging_sub_expression.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![feature(never_type)] diff --git a/tests/ui/dlist.rs b/tests/ui/dlist.rs index dbbac901b03..cf16777b77a 100644 --- a/tests/ui/dlist.rs +++ b/tests/ui/dlist.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![feature(alloc)] #![feature(associated_type_defaults)] diff --git a/tests/ui/doc.rs b/tests/ui/doc.rs index 85e688e0f07..37f89de471f 100644 --- a/tests/ui/doc.rs +++ b/tests/ui/doc.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + //! This file tests for the DOC_MARKDOWN lint diff --git a/tests/ui/double_neg.rs b/tests/ui/double_neg.rs index 31e7a508fcd..3785c09060b 100644 --- a/tests/ui/double_neg.rs +++ b/tests/ui/double_neg.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #[warn(clippy::double_neg)] diff --git a/tests/ui/double_parens.rs b/tests/ui/double_parens.rs index 18ff140c3ca..be1676a7487 100644 --- a/tests/ui/double_parens.rs +++ b/tests/ui/double_parens.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::double_parens)] diff --git a/tests/ui/drop_forget_copy.rs b/tests/ui/drop_forget_copy.rs index 8b2b96a14d3..44e9ae0e044 100644 --- a/tests/ui/drop_forget_copy.rs +++ b/tests/ui/drop_forget_copy.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::drop_copy, clippy::forget_copy)] diff --git a/tests/ui/drop_forget_ref.rs b/tests/ui/drop_forget_ref.rs index 0f36b823e0f..0aee38d3cbf 100644 --- a/tests/ui/drop_forget_ref.rs +++ b/tests/ui/drop_forget_ref.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::drop_ref, clippy::forget_ref)] diff --git a/tests/ui/duplicate_underscore_argument.rs b/tests/ui/duplicate_underscore_argument.rs index 25b2a0ba8b6..27329965f0c 100644 --- a/tests/ui/duplicate_underscore_argument.rs +++ b/tests/ui/duplicate_underscore_argument.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::duplicate_underscore_argument)] diff --git a/tests/ui/duration_subsec.rs b/tests/ui/duration_subsec.rs index 75352ad182b..c8db599a840 100644 --- a/tests/ui/duration_subsec.rs +++ b/tests/ui/duration_subsec.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::duration_subsec)] diff --git a/tests/ui/else_if_without_else.rs b/tests/ui/else_if_without_else.rs index 56987d0d64d..caaa024ff6b 100644 --- a/tests/ui/else_if_without_else.rs +++ b/tests/ui/else_if_without_else.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::all)] #![warn(clippy::else_if_without_else)] diff --git a/tests/ui/empty_enum.rs b/tests/ui/empty_enum.rs index cd63acb9ed6..b60f5491a93 100644 --- a/tests/ui/empty_enum.rs +++ b/tests/ui/empty_enum.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![allow(dead_code)] diff --git a/tests/ui/empty_line_after_outer_attribute.rs b/tests/ui/empty_line_after_outer_attribute.rs index 8aa2e8a1f46..43105b6e342 100644 --- a/tests/ui/empty_line_after_outer_attribute.rs +++ b/tests/ui/empty_line_after_outer_attribute.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::empty_line_after_outer_attr)] // This should produce a warning diff --git a/tests/ui/entry.rs b/tests/ui/entry.rs index 0bab6bf332e..0ee6d799222 100644 --- a/tests/ui/entry.rs +++ b/tests/ui/entry.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![allow(unused, clippy::needless_pass_by_value)] diff --git a/tests/ui/enum_glob_use.rs b/tests/ui/enum_glob_use.rs index e24e2fd8eb3..9b7d4518c66 100644 --- a/tests/ui/enum_glob_use.rs +++ b/tests/ui/enum_glob_use.rs @@ -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)] diff --git a/tests/ui/enum_variants.rs b/tests/ui/enum_variants.rs index 8a51e2f58f1..34c69854b75 100644 --- a/tests/ui/enum_variants.rs +++ b/tests/ui/enum_variants.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![feature(non_ascii_idents)] diff --git a/tests/ui/enums_clike.rs b/tests/ui/enums_clike.rs index 17983255030..5513a9506aa 100644 --- a/tests/ui/enums_clike.rs +++ b/tests/ui/enums_clike.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + // ignore-x86 diff --git a/tests/ui/eq_op.rs b/tests/ui/eq_op.rs index c96cd8b9af2..36c54b0f42e 100644 --- a/tests/ui/eq_op.rs +++ b/tests/ui/eq_op.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #[warn(clippy::eq_op)] diff --git a/tests/ui/erasing_op.rs b/tests/ui/erasing_op.rs index 1c572b55554..696c58f98ae 100644 --- a/tests/ui/erasing_op.rs +++ b/tests/ui/erasing_op.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #[allow(clippy::no_effect)] diff --git a/tests/ui/eta.rs b/tests/ui/eta.rs index a580ce0831a..e516dd6910a 100644 --- a/tests/ui/eta.rs +++ b/tests/ui/eta.rs @@ -8,7 +8,7 @@ // 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)] #![warn(clippy::redundant_closure, clippy::needless_borrow)] diff --git a/tests/ui/eval_order_dependence.rs b/tests/ui/eval_order_dependence.rs index 4e525b9b2b0..ee8f834fe56 100644 --- a/tests/ui/eval_order_dependence.rs +++ b/tests/ui/eval_order_dependence.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #[warn(clippy::eval_order_dependence)] diff --git a/tests/ui/excessive_precision.rs b/tests/ui/excessive_precision.rs index abfdb0b3da1..5945298da9f 100644 --- a/tests/ui/excessive_precision.rs +++ b/tests/ui/excessive_precision.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::excessive_precision)] #![allow(clippy::print_literal)] diff --git a/tests/ui/explicit_write.rs b/tests/ui/explicit_write.rs index 2a748d25724..8c1e35daa48 100644 --- a/tests/ui/explicit_write.rs +++ b/tests/ui/explicit_write.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::explicit_write)] diff --git a/tests/ui/fallible_impl_from.rs b/tests/ui/fallible_impl_from.rs index 1e1e24ee954..f50d5999de6 100644 --- a/tests/ui/fallible_impl_from.rs +++ b/tests/ui/fallible_impl_from.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![deny(clippy::fallible_impl_from)] diff --git a/tests/ui/filter_methods.rs b/tests/ui/filter_methods.rs index 1bfc03356fb..33441d728ca 100644 --- a/tests/ui/filter_methods.rs +++ b/tests/ui/filter_methods.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::all, clippy::pedantic)] diff --git a/tests/ui/float_cmp.rs b/tests/ui/float_cmp.rs index cb8b7a98e39..5619539fb5a 100644 --- a/tests/ui/float_cmp.rs +++ b/tests/ui/float_cmp.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::float_cmp)] diff --git a/tests/ui/float_cmp_const.rs b/tests/ui/float_cmp_const.rs index 27d829ed105..7cca1df65ae 100644 --- a/tests/ui/float_cmp_const.rs +++ b/tests/ui/float_cmp_const.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::float_cmp_const)] diff --git a/tests/ui/fn_to_numeric_cast.rs b/tests/ui/fn_to_numeric_cast.rs index 9bd0ad7687f..50796e13ef6 100644 --- a/tests/ui/fn_to_numeric_cast.rs +++ b/tests/ui/fn_to_numeric_cast.rs @@ -9,7 +9,7 @@ // only-64bit -#![feature(tool_lints)] + #![warn(clippy::fn_to_numeric_cast, clippy::fn_to_numeric_cast_with_truncation)] diff --git a/tests/ui/for_loop.rs b/tests/ui/for_loop.rs index cff7075543b..bdb6b56e0bb 100644 --- a/tests/ui/for_loop.rs +++ b/tests/ui/for_loop.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + use std::collections::*; diff --git a/tests/ui/format.rs b/tests/ui/format.rs index 5679a55755c..e314d3022da 100644 --- a/tests/ui/format.rs +++ b/tests/ui/format.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![allow(clippy::print_literal)] #![warn(clippy::useless_format)] diff --git a/tests/ui/formatting.rs b/tests/ui/formatting.rs index 15aff5a3bba..0dca8c8585b 100644 --- a/tests/ui/formatting.rs +++ b/tests/ui/formatting.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::all)] diff --git a/tests/ui/functions.rs b/tests/ui/functions.rs index 136adef823b..f5ba0f791ee 100644 --- a/tests/ui/functions.rs +++ b/tests/ui/functions.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::all)] diff --git a/tests/ui/fxhash.rs b/tests/ui/fxhash.rs index e91cfcb9e70..fe4b80807c0 100644 --- a/tests/ui/fxhash.rs +++ b/tests/ui/fxhash.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::default_hash_types)] #![feature(rustc_private)] diff --git a/tests/ui/identity_conversion.rs b/tests/ui/identity_conversion.rs index a4f5babecfc..9384c9eb206 100644 --- a/tests/ui/identity_conversion.rs +++ b/tests/ui/identity_conversion.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![deny(clippy::identity_conversion)] diff --git a/tests/ui/identity_op.rs b/tests/ui/identity_op.rs index 35afb85109f..07a4ef8f3eb 100644 --- a/tests/ui/identity_op.rs +++ b/tests/ui/identity_op.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + const ONE : i64 = 1; diff --git a/tests/ui/if_let_redundant_pattern_matching.rs b/tests/ui/if_let_redundant_pattern_matching.rs index 84f4b711f53..1c0e7e79c68 100644 --- a/tests/ui/if_let_redundant_pattern_matching.rs +++ b/tests/ui/if_let_redundant_pattern_matching.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::all)] diff --git a/tests/ui/if_not_else.rs b/tests/ui/if_not_else.rs index b0744d8c600..23895c0ab52 100644 --- a/tests/ui/if_not_else.rs +++ b/tests/ui/if_not_else.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::all)] #![warn(clippy::if_not_else)] diff --git a/tests/ui/impl.rs b/tests/ui/impl.rs index 6c2152220cf..38c0a484091 100644 --- a/tests/ui/impl.rs +++ b/tests/ui/impl.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![allow(dead_code)] #![warn(clippy::multiple_inherent_impl)] diff --git a/tests/ui/inconsistent_digit_grouping.rs b/tests/ui/inconsistent_digit_grouping.rs index dc73952ca25..941fbe5154a 100644 --- a/tests/ui/inconsistent_digit_grouping.rs +++ b/tests/ui/inconsistent_digit_grouping.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #[warn(clippy::inconsistent_digit_grouping)] #[allow(unused_variables)] diff --git a/tests/ui/indexing_slicing.rs b/tests/ui/indexing_slicing.rs index 8d3f3cee99a..6a32eb87491 100644 --- a/tests/ui/indexing_slicing.rs +++ b/tests/ui/indexing_slicing.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![feature(plugin)] #![warn(clippy::indexing_slicing)] diff --git a/tests/ui/infallible_destructuring_match.rs b/tests/ui/infallible_destructuring_match.rs index bd4e4b49a4a..62036cbc107 100644 --- a/tests/ui/infallible_destructuring_match.rs +++ b/tests/ui/infallible_destructuring_match.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![feature(exhaustive_patterns, never_type)] #![allow(clippy::let_and_return)] diff --git a/tests/ui/infinite_iter.rs b/tests/ui/infinite_iter.rs index cf30a2e35ed..68c10acb2be 100644 --- a/tests/ui/infinite_iter.rs +++ b/tests/ui/infinite_iter.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + use std::iter::repeat; #[allow(clippy::trivially_copy_pass_by_ref)] diff --git a/tests/ui/infinite_loop.rs b/tests/ui/infinite_loop.rs index e837e563f18..869b34e8ade 100644 --- a/tests/ui/infinite_loop.rs +++ b/tests/ui/infinite_loop.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![allow(clippy::trivially_copy_pass_by_ref)] diff --git a/tests/ui/inline_fn_without_body.rs b/tests/ui/inline_fn_without_body.rs index 93dff0d350f..8434d33f65e 100644 --- a/tests/ui/inline_fn_without_body.rs +++ b/tests/ui/inline_fn_without_body.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::inline_fn_without_body)] diff --git a/tests/ui/int_plus_one.rs b/tests/ui/int_plus_one.rs index df16a393824..8a0405321d0 100644 --- a/tests/ui/int_plus_one.rs +++ b/tests/ui/int_plus_one.rs @@ -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; diff --git a/tests/ui/invalid_upcast_comparisons.rs b/tests/ui/invalid_upcast_comparisons.rs index 5c17970d337..3e62f11006d 100644 --- a/tests/ui/invalid_upcast_comparisons.rs +++ b/tests/ui/invalid_upcast_comparisons.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::invalid_upcast_comparisons)] diff --git a/tests/ui/issue_2356.rs b/tests/ui/issue_2356.rs index d251d51f3fc..070808f7b69 100644 --- a/tests/ui/issue_2356.rs +++ b/tests/ui/issue_2356.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![deny(clippy::while_let_on_iterator)] diff --git a/tests/ui/item_after_statement.rs b/tests/ui/item_after_statement.rs index d765adae38c..a4cc42f0d72 100644 --- a/tests/ui/item_after_statement.rs +++ b/tests/ui/item_after_statement.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::items_after_statements)] diff --git a/tests/ui/large_digit_groups.rs b/tests/ui/large_digit_groups.rs index 7cc1f9c881d..aad5c205041 100644 --- a/tests/ui/large_digit_groups.rs +++ b/tests/ui/large_digit_groups.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #[warn(clippy::large_digit_groups)] #[allow(unused_variables)] diff --git a/tests/ui/large_enum_variant.rs b/tests/ui/large_enum_variant.rs index 729cc8940ef..419cb0ab428 100644 --- a/tests/ui/large_enum_variant.rs +++ b/tests/ui/large_enum_variant.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![allow(dead_code)] diff --git a/tests/ui/len_zero.rs b/tests/ui/len_zero.rs index a8f1e283643..bc82e0bca04 100644 --- a/tests/ui/len_zero.rs +++ b/tests/ui/len_zero.rs @@ -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)] diff --git a/tests/ui/let_if_seq.rs b/tests/ui/let_if_seq.rs index 5fca759a4b3..080fa3b24b8 100644 --- a/tests/ui/let_if_seq.rs +++ b/tests/ui/let_if_seq.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![allow(unused_variables, unused_assignments, clippy::similar_names, clippy::blacklisted_name)] diff --git a/tests/ui/let_return.rs b/tests/ui/let_return.rs index 380f775689d..317aaf42b5c 100644 --- a/tests/ui/let_return.rs +++ b/tests/ui/let_return.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![allow(unused)] diff --git a/tests/ui/let_unit.rs b/tests/ui/let_unit.rs index 578fcb2ddde..d77bc8712bf 100644 --- a/tests/ui/let_unit.rs +++ b/tests/ui/let_unit.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::let_unit_value)] diff --git a/tests/ui/lifetimes.rs b/tests/ui/lifetimes.rs index c7ed303b43b..77f25afe023 100644 --- a/tests/ui/lifetimes.rs +++ b/tests/ui/lifetimes.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::needless_lifetimes, clippy::extra_unused_lifetimes)] diff --git a/tests/ui/literals.rs b/tests/ui/literals.rs index 3c1dcf09af2..4db7ce95712 100644 --- a/tests/ui/literals.rs +++ b/tests/ui/literals.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::mixed_case_hex_literals)] #![warn(clippy::unseparated_literal_suffix)] diff --git a/tests/ui/map_clone.rs b/tests/ui/map_clone.rs index 90611023f75..162d8a484b4 100644 --- a/tests/ui/map_clone.rs +++ b/tests/ui/map_clone.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::all, clippy::pedantic)] #![allow(clippy::missing_docs_in_private_items)] diff --git a/tests/ui/map_flatten.rs b/tests/ui/map_flatten.rs index b3f86d81e3f..1b5c20069d1 100644 --- a/tests/ui/map_flatten.rs +++ b/tests/ui/map_flatten.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::all, clippy::pedantic)] #![allow(clippy::missing_docs_in_private_items)] diff --git a/tests/ui/matches.rs b/tests/ui/matches.rs index e6e4154e437..c43fead08f8 100644 --- a/tests/ui/matches.rs +++ b/tests/ui/matches.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![feature(exclusive_range_pattern)] diff --git a/tests/ui/mem_forget.rs b/tests/ui/mem_forget.rs index 0e7cfbffa4c..266c5c267f8 100644 --- a/tests/ui/mem_forget.rs +++ b/tests/ui/mem_forget.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + diff --git a/tests/ui/mem_replace.rs b/tests/ui/mem_replace.rs index 69e3ae96bad..2b6e6f2ce67 100644 --- a/tests/ui/mem_replace.rs +++ b/tests/ui/mem_replace.rs @@ -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; diff --git a/tests/ui/methods.rs b/tests/ui/methods.rs index e247a3d6450..883dbf589d7 100644 --- a/tests/ui/methods.rs +++ b/tests/ui/methods.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::all, clippy::pedantic, clippy::option_unwrap_used)] diff --git a/tests/ui/min_max.rs b/tests/ui/min_max.rs index 32e3863ad40..b4ca46231e0 100644 --- a/tests/ui/min_max.rs +++ b/tests/ui/min_max.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::all)] diff --git a/tests/ui/missing-doc.rs b/tests/ui/missing-doc.rs index 43dad8398f1..6e7dfbfa37a 100644 --- a/tests/ui/missing-doc.rs +++ b/tests/ui/missing-doc.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + /* This file incorporates work covered by the following copyright and * permission notice: diff --git a/tests/ui/missing_inline.rs b/tests/ui/missing_inline.rs index 593774da1b4..0b86c4e5cfe 100644 --- a/tests/ui/missing_inline.rs +++ b/tests/ui/missing_inline.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + /* This file incorporates work covered by the following copyright and * permission notice: diff --git a/tests/ui/module_inception.rs b/tests/ui/module_inception.rs index 1dfc06f38af..333a8efec32 100644 --- a/tests/ui/module_inception.rs +++ b/tests/ui/module_inception.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::module_inception)] diff --git a/tests/ui/modulo_one.rs b/tests/ui/modulo_one.rs index 6e0cbc581dc..f1576447708 100644 --- a/tests/ui/modulo_one.rs +++ b/tests/ui/modulo_one.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::modulo_one)] #![allow(clippy::no_effect, clippy::unnecessary_operation)] diff --git a/tests/ui/mut_from_ref.rs b/tests/ui/mut_from_ref.rs index 37256efb839..0a68d449d92 100644 --- a/tests/ui/mut_from_ref.rs +++ b/tests/ui/mut_from_ref.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![allow(unused, clippy::trivially_copy_pass_by_ref)] #![warn(clippy::mut_from_ref)] diff --git a/tests/ui/mut_mut.rs b/tests/ui/mut_mut.rs index 81c945beafc..bed872902af 100644 --- a/tests/ui/mut_mut.rs +++ b/tests/ui/mut_mut.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![allow(unused, clippy::no_effect, clippy::unnecessary_operation)] diff --git a/tests/ui/mut_reference.rs b/tests/ui/mut_reference.rs index f42d48f0db4..d63b854fd09 100644 --- a/tests/ui/mut_reference.rs +++ b/tests/ui/mut_reference.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![allow(unused_variables, clippy::trivially_copy_pass_by_ref)] diff --git a/tests/ui/mutex_atomic.rs b/tests/ui/mutex_atomic.rs index e0ce93bf698..87b4ac9d8e3 100644 --- a/tests/ui/mutex_atomic.rs +++ b/tests/ui/mutex_atomic.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::all)] diff --git a/tests/ui/needless_bool.rs b/tests/ui/needless_bool.rs index 0e8e250c95d..a9a2e3709f1 100644 --- a/tests/ui/needless_bool.rs +++ b/tests/ui/needless_bool.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::needless_bool)] diff --git a/tests/ui/needless_borrow.rs b/tests/ui/needless_borrow.rs index 1cf7b40661d..f8a170f38d4 100644 --- a/tests/ui/needless_borrow.rs +++ b/tests/ui/needless_borrow.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + use std::borrow::Cow; diff --git a/tests/ui/needless_borrowed_ref.rs b/tests/ui/needless_borrowed_ref.rs index 650b57b586c..ca3e60bd7e7 100644 --- a/tests/ui/needless_borrowed_ref.rs +++ b/tests/ui/needless_borrowed_ref.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #[warn(clippy::needless_borrowed_reference)] diff --git a/tests/ui/needless_collect.rs b/tests/ui/needless_collect.rs index 45622b33384..91ebd354146 100644 --- a/tests/ui/needless_collect.rs +++ b/tests/ui/needless_collect.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + use std::collections::{HashMap, HashSet, BTreeSet}; diff --git a/tests/ui/needless_continue.rs b/tests/ui/needless_continue.rs index 4a15987ba96..3d91132ea62 100644 --- a/tests/ui/needless_continue.rs +++ b/tests/ui/needless_continue.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + macro_rules! zero { diff --git a/tests/ui/needless_pass_by_value.rs b/tests/ui/needless_pass_by_value.rs index 3e029de4755..5825d9e9074 100644 --- a/tests/ui/needless_pass_by_value.rs +++ b/tests/ui/needless_pass_by_value.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::needless_pass_by_value)] #![allow(dead_code, clippy::single_match, clippy::if_let_redundant_pattern_matching, clippy::many_single_char_names, clippy::option_option)] diff --git a/tests/ui/needless_pass_by_value_proc_macro.rs b/tests/ui/needless_pass_by_value_proc_macro.rs index b1ca6d75c99..f8f279ccb66 100644 --- a/tests/ui/needless_pass_by_value_proc_macro.rs +++ b/tests/ui/needless_pass_by_value_proc_macro.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![crate_type = "proc-macro"] #![warn(clippy::needless_pass_by_value)] diff --git a/tests/ui/needless_return.rs b/tests/ui/needless_return.rs index bfe86573a4d..9380f7c48a5 100644 --- a/tests/ui/needless_return.rs +++ b/tests/ui/needless_return.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::needless_return)] diff --git a/tests/ui/needless_update.rs b/tests/ui/needless_update.rs index 70fe7236c24..974f3603fc6 100644 --- a/tests/ui/needless_update.rs +++ b/tests/ui/needless_update.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::needless_update)] diff --git a/tests/ui/neg_cmp_op_on_partial_ord.rs b/tests/ui/neg_cmp_op_on_partial_ord.rs index c8edba32219..6d26d2ec6d1 100644 --- a/tests/ui/neg_cmp_op_on_partial_ord.rs +++ b/tests/ui/neg_cmp_op_on_partial_ord.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + //! This test case utilizes `f64` an easy example for `PartialOrd` only types //! but the lint itself actually validates any expression where the left @@ -27,7 +27,7 @@ fn main() { // Not Less but potentially Greater, Equal or Uncomparable. let _not_less = !(a_value < another_value); - + // Not Less or Equal but potentially Greater or Uncomparable. let _not_less_or_equal = !(a_value <= another_value); diff --git a/tests/ui/neg_multiply.rs b/tests/ui/neg_multiply.rs index 2589f3b8551..446af7bbe94 100644 --- a/tests/ui/neg_multiply.rs +++ b/tests/ui/neg_multiply.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::neg_multiply)] diff --git a/tests/ui/never_loop.rs b/tests/ui/never_loop.rs index 901a98559e7..b952b1197dd 100644 --- a/tests/ui/never_loop.rs +++ b/tests/ui/never_loop.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![allow(clippy::single_match, unused_assignments, unused_variables, clippy::while_immutable_condition)] diff --git a/tests/ui/new_without_default.rs b/tests/ui/new_without_default.rs index 7fa369354b3..783308d264a 100644 --- a/tests/ui/new_without_default.rs +++ b/tests/ui/new_without_default.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![feature(const_fn)] diff --git a/tests/ui/no_effect.rs b/tests/ui/no_effect.rs index a56327eeefa..32e1ccb7bee 100644 --- a/tests/ui/no_effect.rs +++ b/tests/ui/no_effect.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![feature(box_syntax)] diff --git a/tests/ui/non_copy_const.rs b/tests/ui/non_copy_const.rs index 6c57a37e2ab..5cbb610fea3 100644 --- a/tests/ui/non_copy_const.rs +++ b/tests/ui/non_copy_const.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![feature(const_string_new, const_vec_new)] #![allow(clippy::ref_in_deref, dead_code)] diff --git a/tests/ui/non_expressive_names.rs b/tests/ui/non_expressive_names.rs index 47e4da61b51..67fded14485 100644 --- a/tests/ui/non_expressive_names.rs +++ b/tests/ui/non_expressive_names.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::all,clippy::similar_names)] #![allow(unused, clippy::println_empty_string)] diff --git a/tests/ui/ok_if_let.rs b/tests/ui/ok_if_let.rs index 71b301cbc42..b318a90d883 100644 --- a/tests/ui/ok_if_let.rs +++ b/tests/ui/ok_if_let.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::if_let_some_result)] diff --git a/tests/ui/op_ref.rs b/tests/ui/op_ref.rs index 96a208ef807..bacf9f1057b 100644 --- a/tests/ui/op_ref.rs +++ b/tests/ui/op_ref.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![allow(unused_variables, clippy::blacklisted_name)] @@ -19,7 +19,7 @@ fn main() { let tracked_fds: HashSet = HashSet::new(); let new_fds = HashSet::new(); let unwanted = &tracked_fds - &new_fds; - + let foo = &5 - &6; let bar = String::new(); diff --git a/tests/ui/open_options.rs b/tests/ui/open_options.rs index a01f2b1ce39..6b891d72e8b 100644 --- a/tests/ui/open_options.rs +++ b/tests/ui/open_options.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + use std::fs::OpenOptions; diff --git a/tests/ui/option_map_unit_fn.rs b/tests/ui/option_map_unit_fn.rs index a69c41ce967..b023181fcf7 100644 --- a/tests/ui/option_map_unit_fn.rs +++ b/tests/ui/option_map_unit_fn.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::option_map_unit_fn)] #![allow(unused)] diff --git a/tests/ui/overflow_check_conditional.rs b/tests/ui/overflow_check_conditional.rs index 8aba051c65e..82fdfe14ab6 100644 --- a/tests/ui/overflow_check_conditional.rs +++ b/tests/ui/overflow_check_conditional.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![allow(clippy::many_single_char_names)] diff --git a/tests/ui/panic_unimplemented.rs b/tests/ui/panic_unimplemented.rs index f292455dc7d..ede2e8f063b 100644 --- a/tests/ui/panic_unimplemented.rs +++ b/tests/ui/panic_unimplemented.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::panic_params, clippy::unimplemented)] diff --git a/tests/ui/patterns.rs b/tests/ui/patterns.rs index 2b42aae63ea..41e9ec8ca81 100644 --- a/tests/ui/patterns.rs +++ b/tests/ui/patterns.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![allow(unused)] #![warn(clippy::all)] diff --git a/tests/ui/precedence.rs b/tests/ui/precedence.rs index ccc08ddc5d7..4b404022ed4 100644 --- a/tests/ui/precedence.rs +++ b/tests/ui/precedence.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #[warn(clippy::precedence)] diff --git a/tests/ui/print.rs b/tests/ui/print.rs index 3bb72fcb1f4..5fa2cfcc315 100644 --- a/tests/ui/print.rs +++ b/tests/ui/print.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![allow(clippy::print_literal, clippy::write_literal)] #![warn(clippy::print_stdout, clippy::use_debug)] diff --git a/tests/ui/print_literal.rs b/tests/ui/print_literal.rs index fd68751820d..0df26f6d25f 100644 --- a/tests/ui/print_literal.rs +++ b/tests/ui/print_literal.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::print_literal)] diff --git a/tests/ui/print_with_newline.rs b/tests/ui/print_with_newline.rs index 4fc24080d46..2dd08a5b88d 100644 --- a/tests/ui/print_with_newline.rs +++ b/tests/ui/print_with_newline.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![allow(clippy::print_literal)] #![warn(clippy::print_with_newline)] diff --git a/tests/ui/ptr_arg.rs b/tests/ui/ptr_arg.rs index 4d5f353bb6a..df0bde14960 100644 --- a/tests/ui/ptr_arg.rs +++ b/tests/ui/ptr_arg.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![allow(unused, clippy::many_single_char_names)] #![warn(clippy::ptr_arg)] diff --git a/tests/ui/range.rs b/tests/ui/range.rs index 270b71d263f..8b7f0673e24 100644 --- a/tests/ui/range.rs +++ b/tests/ui/range.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + struct NotARange; impl NotARange { diff --git a/tests/ui/range_plus_minus_one.rs b/tests/ui/range_plus_minus_one.rs index 15743828d8b..602743d6914 100644 --- a/tests/ui/range_plus_minus_one.rs +++ b/tests/ui/range_plus_minus_one.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + fn f() -> usize { 42 diff --git a/tests/ui/redundant_closure_call.rs b/tests/ui/redundant_closure_call.rs index bf0cc550b0d..4912e5fc1b4 100644 --- a/tests/ui/redundant_closure_call.rs +++ b/tests/ui/redundant_closure_call.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::redundant_closure_call)] diff --git a/tests/ui/redundant_field_names.rs b/tests/ui/redundant_field_names.rs index ac0d5d10535..41e90bba368 100644 --- a/tests/ui/redundant_field_names.rs +++ b/tests/ui/redundant_field_names.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::redundant_field_names)] #![allow(unused_variables)] diff --git a/tests/ui/reference.rs b/tests/ui/reference.rs index 9298aee2cac..bd0fdd5d5ea 100644 --- a/tests/ui/reference.rs +++ b/tests/ui/reference.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + fn get_number() -> usize { diff --git a/tests/ui/regex.rs b/tests/ui/regex.rs index 6e77c589023..2623438c4c4 100644 --- a/tests/ui/regex.rs +++ b/tests/ui/regex.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![allow(unused)] diff --git a/tests/ui/replace_consts.rs b/tests/ui/replace_consts.rs index 2f961e86f9a..7a2584f174d 100644 --- a/tests/ui/replace_consts.rs +++ b/tests/ui/replace_consts.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![feature(integer_atomics)] #![allow(clippy::blacklisted_name)] diff --git a/tests/ui/result_map_unit_fn.rs b/tests/ui/result_map_unit_fn.rs index 4edbfdd5bf4..f24e52b10fd 100644 --- a/tests/ui/result_map_unit_fn.rs +++ b/tests/ui/result_map_unit_fn.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![feature(never_type)] #![warn(clippy::result_map_unit_fn)] diff --git a/tests/ui/serde.rs b/tests/ui/serde.rs index caa954bea44..47be8423d7b 100644 --- a/tests/ui/serde.rs +++ b/tests/ui/serde.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::serde_api_misuse)] #![allow(dead_code)] diff --git a/tests/ui/shadow.rs b/tests/ui/shadow.rs index a607161a949..aa29bd1d79c 100644 --- a/tests/ui/shadow.rs +++ b/tests/ui/shadow.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::all, clippy::pedantic, clippy::shadow_same, clippy::shadow_reuse, clippy::shadow_unrelated)] diff --git a/tests/ui/short_circuit_statement.rs b/tests/ui/short_circuit_statement.rs index 01511314c7d..67999a74e5e 100644 --- a/tests/ui/short_circuit_statement.rs +++ b/tests/ui/short_circuit_statement.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::short_circuit_statement)] diff --git a/tests/ui/single_char_pattern.rs b/tests/ui/single_char_pattern.rs index 12aaa69f34b..5e1231f1227 100644 --- a/tests/ui/single_char_pattern.rs +++ b/tests/ui/single_char_pattern.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + use std::collections::HashSet; diff --git a/tests/ui/single_match.rs b/tests/ui/single_match.rs index 07c1a95025a..5c7cae249b4 100644 --- a/tests/ui/single_match.rs +++ b/tests/ui/single_match.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::single_match)] diff --git a/tests/ui/starts_ends_with.rs b/tests/ui/starts_ends_with.rs index 180924d2c9c..5c09e8f1f28 100644 --- a/tests/ui/starts_ends_with.rs +++ b/tests/ui/starts_ends_with.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![allow(dead_code)] diff --git a/tests/ui/strings.rs b/tests/ui/strings.rs index 31e6c9a059f..7bc4e6515f6 100644 --- a/tests/ui/strings.rs +++ b/tests/ui/strings.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #[warn(clippy::string_add)] diff --git a/tests/ui/stutter.rs b/tests/ui/stutter.rs index 148e8071ce0..17d528d1050 100644 --- a/tests/ui/stutter.rs +++ b/tests/ui/stutter.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::stutter)] #![allow(dead_code)] diff --git a/tests/ui/suspicious_arithmetic_impl.rs b/tests/ui/suspicious_arithmetic_impl.rs index a183576b40e..5e7608565ed 100644 --- a/tests/ui/suspicious_arithmetic_impl.rs +++ b/tests/ui/suspicious_arithmetic_impl.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::suspicious_arithmetic_impl)] diff --git a/tests/ui/swap.rs b/tests/ui/swap.rs index bef2031f8a8..90c2aec9875 100644 --- a/tests/ui/swap.rs +++ b/tests/ui/swap.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::all)] diff --git a/tests/ui/temporary_assignment.rs b/tests/ui/temporary_assignment.rs index cf92f9fd6c2..9c4365bef40 100644 --- a/tests/ui/temporary_assignment.rs +++ b/tests/ui/temporary_assignment.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::temporary_assignment)] diff --git a/tests/ui/toplevel_ref_arg.rs b/tests/ui/toplevel_ref_arg.rs index 9f92d706ad6..09ee79f6d8b 100644 --- a/tests/ui/toplevel_ref_arg.rs +++ b/tests/ui/toplevel_ref_arg.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::all)] diff --git a/tests/ui/transmute.rs b/tests/ui/transmute.rs index 4108750acf6..285c07a9724 100644 --- a/tests/ui/transmute.rs +++ b/tests/ui/transmute.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![allow(dead_code)] diff --git a/tests/ui/transmute_64bit.rs b/tests/ui/transmute_64bit.rs index 630b594eb1b..8620628fdce 100644 --- a/tests/ui/transmute_64bit.rs +++ b/tests/ui/transmute_64bit.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + //ignore-x86 //no-ignore-x86_64 diff --git a/tests/ui/trivially_copy_pass_by_ref.rs b/tests/ui/trivially_copy_pass_by_ref.rs index 716e0dc6420..cebe15b2cc8 100644 --- a/tests/ui/trivially_copy_pass_by_ref.rs +++ b/tests/ui/trivially_copy_pass_by_ref.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![allow(clippy::many_single_char_names, clippy::blacklisted_name, clippy::redundant_field_names)] diff --git a/tests/ui/unicode.rs b/tests/ui/unicode.rs index 486135ddfa5..8de17fea220 100644 --- a/tests/ui/unicode.rs +++ b/tests/ui/unicode.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #[warn(clippy::zero_width_space)] diff --git a/tests/ui/unit_arg.rs b/tests/ui/unit_arg.rs index ed70ee843b1..058c6563c5a 100644 --- a/tests/ui/unit_arg.rs +++ b/tests/ui/unit_arg.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::unit_arg)] #![allow(clippy::no_effect)] diff --git a/tests/ui/unit_cmp.rs b/tests/ui/unit_cmp.rs index e8726bf7364..10eb0c70c54 100644 --- a/tests/ui/unit_cmp.rs +++ b/tests/ui/unit_cmp.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::unit_cmp)] diff --git a/tests/ui/unnecessary_clone.rs b/tests/ui/unnecessary_clone.rs index 82010db7a99..df02570d692 100644 --- a/tests/ui/unnecessary_clone.rs +++ b/tests/ui/unnecessary_clone.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::clone_on_ref_ptr)] #![allow(unused)] diff --git a/tests/ui/unnecessary_ref.rs b/tests/ui/unnecessary_ref.rs index 6fb2abaf19c..adc628fe8b6 100644 --- a/tests/ui/unnecessary_ref.rs +++ b/tests/ui/unnecessary_ref.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![feature(tool_attributes)] #![feature(stmt_expr_attributes)] diff --git a/tests/ui/unneeded_field_pattern.rs b/tests/ui/unneeded_field_pattern.rs index 963d555ca56..128a3fee429 100644 --- a/tests/ui/unneeded_field_pattern.rs +++ b/tests/ui/unneeded_field_pattern.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::unneeded_field_pattern)] diff --git a/tests/ui/unreadable_literal.rs b/tests/ui/unreadable_literal.rs index 67e04706f04..9142b3d2911 100644 --- a/tests/ui/unreadable_literal.rs +++ b/tests/ui/unreadable_literal.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #[warn(clippy::unreadable_literal)] #[allow(unused_variables)] diff --git a/tests/ui/unsafe_removed_from_name.rs b/tests/ui/unsafe_removed_from_name.rs index 39aa4afdf8d..9c1800467d3 100644 --- a/tests/ui/unsafe_removed_from_name.rs +++ b/tests/ui/unsafe_removed_from_name.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![allow(unused_imports)] #![allow(dead_code)] diff --git a/tests/ui/unused_io_amount.rs b/tests/ui/unused_io_amount.rs index 0ab89c994f4..a47a6ccfdf6 100644 --- a/tests/ui/unused_io_amount.rs +++ b/tests/ui/unused_io_amount.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![allow(dead_code)] diff --git a/tests/ui/unused_labels.rs b/tests/ui/unused_labels.rs index ecfdab490f6..d7d843dfc25 100644 --- a/tests/ui/unused_labels.rs +++ b/tests/ui/unused_labels.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![allow(dead_code, clippy::items_after_statements, clippy::never_loop)] diff --git a/tests/ui/unused_lt.rs b/tests/ui/unused_lt.rs index 3aea986d28d..de13864421e 100644 --- a/tests/ui/unused_lt.rs +++ b/tests/ui/unused_lt.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![allow(unused, dead_code, clippy::needless_lifetimes, clippy::needless_pass_by_value, clippy::trivially_copy_pass_by_ref)] #![warn(clippy::extra_unused_lifetimes)] diff --git a/tests/ui/unwrap_or.rs b/tests/ui/unwrap_or.rs index b31ccfea200..80965635a08 100644 --- a/tests/ui/unwrap_or.rs +++ b/tests/ui/unwrap_or.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::all)] fn main() { diff --git a/tests/ui/use_self.rs b/tests/ui/use_self.rs index 784e0c04016..6ebe8f16a90 100644 --- a/tests/ui/use_self.rs +++ b/tests/ui/use_self.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::use_self)] #![allow(dead_code)] diff --git a/tests/ui/used_underscore_binding.rs b/tests/ui/used_underscore_binding.rs index 13ae1d67f15..b6b055e58bc 100644 --- a/tests/ui/used_underscore_binding.rs +++ b/tests/ui/used_underscore_binding.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::all)] diff --git a/tests/ui/useless_asref.rs b/tests/ui/useless_asref.rs index 598618365c8..a5e9caf3a67 100644 --- a/tests/ui/useless_asref.rs +++ b/tests/ui/useless_asref.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![deny(clippy::useless_asref)] #![allow(clippy::trivially_copy_pass_by_ref)] diff --git a/tests/ui/useless_attribute.rs b/tests/ui/useless_attribute.rs index 710f35da72b..9fb84866ef6 100644 --- a/tests/ui/useless_attribute.rs +++ b/tests/ui/useless_attribute.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::useless_attribute)] diff --git a/tests/ui/useless_attribute.stderr b/tests/ui/useless_attribute.stderr index 4a27d1148b4..6b82b105b05 100644 --- a/tests/ui/useless_attribute.stderr +++ b/tests/ui/useless_attribute.stderr @@ -10,7 +10,7 @@ error: useless lint attribute --> $DIR/useless_attribute.rs:16:1 | 16 | #[cfg_attr(feature = "cargo-clippy", allow(dead_code))] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: if you just forgot a `!`, use: `#![cfg_attr(feature = "cargo-clippy", allow(dead_code))` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: if you just forgot a `!`, use: `#![cfg_attr(feature = "cargo-clippy", allow(dead_code)` error: aborting due to 2 previous errors diff --git a/tests/ui/vec.rs b/tests/ui/vec.rs index 45e51663795..e74aded5728 100644 --- a/tests/ui/vec.rs +++ b/tests/ui/vec.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::useless_vec)] diff --git a/tests/ui/while_loop.rs b/tests/ui/while_loop.rs index ff7a43fd693..3cc7c52df5d 100644 --- a/tests/ui/while_loop.rs +++ b/tests/ui/while_loop.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::while_let_loop, clippy::empty_loop, clippy::while_let_on_iterator)] diff --git a/tests/ui/write_literal.rs b/tests/ui/write_literal.rs index 9a27ca11dae..7917479ed67 100644 --- a/tests/ui/write_literal.rs +++ b/tests/ui/write_literal.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![allow(unused_must_use)] #![warn(clippy::write_literal)] diff --git a/tests/ui/write_with_newline.rs b/tests/ui/write_with_newline.rs index f3e26ed904f..e9fcff0b3dd 100644 --- a/tests/ui/write_with_newline.rs +++ b/tests/ui/write_with_newline.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![allow(clippy::write_literal)] #![warn(clippy::write_with_newline)] diff --git a/tests/ui/writeln_empty_string.rs b/tests/ui/writeln_empty_string.rs index 888e870667c..e272a5af88b 100644 --- a/tests/ui/writeln_empty_string.rs +++ b/tests/ui/writeln_empty_string.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![allow(unused_must_use)] #![warn(clippy::writeln_empty_string)] diff --git a/tests/ui/wrong_self_convention.rs b/tests/ui/wrong_self_convention.rs index d843af1a396..d1c7424c8d7 100644 --- a/tests/ui/wrong_self_convention.rs +++ b/tests/ui/wrong_self_convention.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #![warn(clippy::wrong_self_convention)] diff --git a/tests/ui/zero_div_zero.rs b/tests/ui/zero_div_zero.rs index c2cbd32968f..4e2272c8e09 100644 --- a/tests/ui/zero_div_zero.rs +++ b/tests/ui/zero_div_zero.rs @@ -8,7 +8,7 @@ // except according to those terms. -#![feature(tool_lints)] + #[allow(unused_variables)]