Skip to content

[do not merge] Stabilize tool_lints #3271

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion clippy_dev/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(tool_lints)]

#![allow(clippy::default_hash_types)]

use itertools::Itertools;
Expand Down
9 changes: 4 additions & 5 deletions clippy_lints/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
// error-pattern:cargo-clippy

#![feature(box_syntax)]
#![feature(crate_visibility_modifier)]
#![feature(macro_at_most_once_rep)]
#![feature(range_contains)]
#![feature(rustc_private)]
#![feature(slice_patterns)]
#![feature(stmt_expr_attributes)]
#![feature(range_contains)]
#![allow(unknown_lints, clippy::shadow_reuse, clippy::missing_docs_in_private_items)]
#![recursion_limit = "256"]
#![feature(macro_at_most_once_rep)]
#![feature(tool_lints)]
#![allow(clippy::shadow_reuse, clippy::missing_docs_in_private_items)]
#![warn(rust_2018_idioms, trivial_casts, trivial_numeric_casts)]
#![feature(crate_visibility_modifier)]

// FIXME: switch to something more ergonomic here, once available.
// (currently there is no way to opt into sysroot crates w/o `extern crate`)
Expand Down
3 changes: 1 addition & 2 deletions src/driver.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// error-pattern:yummy
#![feature(box_syntax)]
#![feature(rustc_private)]
#![feature(tool_lints)]
#![allow(unknown_lints, clippy::missing_docs_in_private_items)]
#![allow(clippy::missing_docs_in_private_items)]

// FIXME: switch to something more ergonomic here, once available.
// (currently there is no way to opt into sysroot crates w/o `extern crate`)
Expand Down
2 changes: 0 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// 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)]

Expand Down
3 changes: 1 addition & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// error-pattern:yummy
#![feature(box_syntax)]
#![feature(rustc_private)]
#![feature(tool_lints)]
#![allow(unknown_lints, clippy::missing_docs_in_private_items)]
#![allow(clippy::missing_docs_in_private_items)]

use rustc_tools_util::*;

Expand Down
2 changes: 1 addition & 1 deletion tests/run-pass/enum-glob-import-crate.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(tool_lints)]


#![deny(clippy::all)]
#![allow(unused_imports)]
Expand Down
2 changes: 1 addition & 1 deletion tests/run-pass/ice-1588.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(tool_lints)]


#![allow(clippy::all)]

Expand Down
2 changes: 1 addition & 1 deletion tests/run-pass/ice-1969.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(tool_lints)]


#![allow(clippy::all)]

Expand Down
2 changes: 1 addition & 1 deletion tests/run-pass/ice-2499.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(tool_lints)]


#![allow(dead_code, clippy::char_lit_as_u8, clippy::needless_bool)]

Expand Down
2 changes: 1 addition & 1 deletion tests/run-pass/ice-2760.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(tool_lints)]


#![allow(unused_variables, clippy::blacklisted_name,
clippy::needless_pass_by_value, dead_code)]
Expand Down
2 changes: 1 addition & 1 deletion tests/run-pass/ice-2774.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(tool_lints)]


use std::collections::HashSet;

Expand Down
2 changes: 1 addition & 1 deletion tests/run-pass/ice-700.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(tool_lints)]


#![deny(clippy::all)]

Expand Down
2 changes: 1 addition & 1 deletion tests/run-pass/ice_exacte_size.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(tool_lints)]


#![deny(clippy::all)]

Expand Down
2 changes: 1 addition & 1 deletion tests/run-pass/if_same_then_else.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(tool_lints)]


#![deny(clippy::if_same_then_else)]

Expand Down
2 changes: 1 addition & 1 deletion tests/run-pass/match_same_arms_const.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(tool_lints)]


#![deny(clippy::match_same_arms)]

Expand Down
2 changes: 1 addition & 1 deletion tests/run-pass/mut_mut_macro.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(tool_lints)]


#![deny(clippy::mut_mut, clippy::zero_ptr, clippy::cmp_nan)]
#![allow(dead_code)]
Expand Down
2 changes: 1 addition & 1 deletion tests/run-pass/needless_borrow_fp.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(tool_lints)]


#[deny(clippy::all)]

Expand Down
2 changes: 1 addition & 1 deletion tests/run-pass/needless_lifetimes_impl_trait.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(tool_lints)]


#![deny(clippy::needless_lifetimes)]
#![allow(dead_code)]
Expand Down
2 changes: 1 addition & 1 deletion tests/run-pass/regressions.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(tool_lints)]


#![allow(clippy::blacklisted_name)]

Expand Down
2 changes: 1 addition & 1 deletion tests/run-pass/single-match-else.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(tool_lints)]


#![warn(clippy::single_match_else)]

Expand Down
2 changes: 1 addition & 1 deletion tests/run-pass/used_underscore_binding_macro.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(tool_lints)]


#![allow(clippy::useless_attribute)] //issue #2910

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(tool_lints)]



#![allow(dead_code)]
Expand Down
2 changes: 1 addition & 1 deletion tests/ui-toml/toml_trivially_copy/test.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(tool_lints)]

#![allow(clippy::many_single_char_names)]

#[derive(Copy, Clone)]
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/absurd-extreme-comparisons.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(tool_lints)]



#![warn(clippy::absurd_extreme_comparisons)]
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/approx_const.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(tool_lints)]



#[warn(clippy::approx_constant)]
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/arithmetic.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(tool_lints)]



#![warn(clippy::integer_arithmetic, clippy::float_arithmetic)]
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/assign_ops.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(tool_lints)]


#[allow(dead_code, unused_assignments)]
#[warn(clippy::assign_op_pattern)]
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/assign_ops2.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(tool_lints)]



#[allow(unused_assignments)]
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/attrs.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(tool_lints)]



#![warn(clippy::inline_always, clippy::deprecated_semver)]
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/bit_masks.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(tool_lints)]



const THREE_BITS : i64 = 7;
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/blacklisted_name.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(tool_lints)]



#![allow(dead_code, clippy::similar_names, clippy::single_match, clippy::toplevel_ref_arg, unused_mut, unused_variables)]
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/block_in_if_condition.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(tool_lints)]



#![warn(clippy::block_in_if_condition_expr)]
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/bool_comparison.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(tool_lints)]



#[warn(clippy::bool_comparison)]
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/booleans.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(tool_lints)]


#![warn(clippy::nonminimal_bool, clippy::logic_bug)]

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/borrow_box.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(tool_lints)]



#![deny(clippy::borrowed_box)]
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/box_vec.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(tool_lints)]



#![warn(clippy::all)]
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/builtin-type-shadow.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(tool_lints)]


#![warn(clippy::builtin_type_shadow)]

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/bytecount.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(tool_lints)]



#[deny(clippy::naive_bytecount)]
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/cast.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(tool_lints)]



#[warn(clippy::cast_precision_loss, clippy::cast_possible_truncation, clippy::cast_sign_loss, clippy::cast_possible_wrap, clippy::cast_lossless)]
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/cast_alignment.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(tool_lints)]


//! Test casts for alignment issues

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/cast_lossless_float.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(tool_lints)]


#[warn(clippy::cast_lossless)]
#[allow(clippy::no_effect, clippy::unnecessary_operation)]
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/cast_lossless_integer.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(tool_lints)]

#[warn(clippy::cast_lossless)]
#[allow(clippy::no_effect, clippy::unnecessary_operation)]
fn main() {
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/cast_size.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![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)]
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/char_lit_as_u8.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(tool_lints)]



#![warn(clippy::char_lit_as_u8)]
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/checked_unwrap.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(tool_lints)]


#![deny(clippy::panicking_unwrap, clippy::unnecessary_unwrap)]
#![allow(clippy::if_same_then_else)]
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/clone_on_copy_mut.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(tool_lints)]


pub fn dec_read_dec(i: &mut i32) -> i32 {
*i -= 1;
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/cmp_nan.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(tool_lints)]



#[warn(clippy::cmp_nan)]
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/cmp_null.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(tool_lints)]


#![warn(clippy::cmp_null)]
#![allow(unused_mut)]
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/cmp_owned.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(tool_lints)]



#[warn(clippy::cmp_owned)]
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/collapsible_if.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(tool_lints)]



#[warn(clippy::collapsible_if)]
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/complex_types.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(tool_lints)]


#![warn(clippy::all)]
#![allow(unused, clippy::needless_pass_by_value)]
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/copies.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![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)]
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/copy_iterator.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(tool_lints)]


#![warn(clippy::copy_iterator)]

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/cstring.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(tool_lints)]


fn main() {}

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/cyclomatic_complexity.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(tool_lints)]


#![allow(clippy::all)]
#![warn(clippy::cyclomatic_complexity)]
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/cyclomatic_complexity_attr_used.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(tool_lints)]


#![warn(clippy::cyclomatic_complexity)]
#![warn(unused)]
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/decimal_literal_representation.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(tool_lints)]



#[warn(clippy::decimal_literal_representation)]
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/default_trait_access.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(tool_lints)]


#![warn(clippy::default_trait_access)]

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/derive.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(tool_lints)]


#![feature(untagged_unions)]

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/diverging_sub_expression.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(tool_lints)]


#![feature(never_type)]

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/dlist.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(tool_lints)]


#![feature(alloc)]
#![feature(associated_type_defaults)]
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/doc.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(tool_lints)]


//! This file tests for the DOC_MARKDOWN lint

Expand Down
Loading