mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-27 07:00:55 +00:00
parent
68d4b3af12
commit
3124d2b8df
14 changed files with 37 additions and 4 deletions
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "clippy"
|
||||
version = "0.0.13"
|
||||
version = "0.0.14"
|
||||
authors = [
|
||||
"Manish Goregaokar <manishsmail@gmail.com>",
|
||||
"Andre Bogus <bogusandre@gmail.com>",
|
||||
|
|
|
@ -2,6 +2,9 @@ use rustc::lint::*;
|
|||
use rustc_front::hir::*;
|
||||
use std::f64::consts as f64;
|
||||
use utils::span_lint;
|
||||
use syntax::ast::Lit_::*;
|
||||
use syntax::ast::Lit;
|
||||
use syntax::ast::FloatTy::*;
|
||||
|
||||
declare_lint! {
|
||||
pub APPROX_CONSTANT,
|
||||
|
|
|
@ -4,7 +4,8 @@ use rustc::lint::*;
|
|||
use rustc_front::hir::*;
|
||||
use reexport::*;
|
||||
use syntax::codemap::Span;
|
||||
|
||||
use syntax::attr::*;
|
||||
use syntax::ast::{Attribute, MetaList, MetaWord};
|
||||
use utils::{in_macro, match_path, span_lint};
|
||||
|
||||
declare_lint! { pub INLINE_ALWAYS, Warn,
|
||||
|
|
|
@ -4,6 +4,7 @@ use rustc::middle::def::*;
|
|||
use rustc_front::hir::*;
|
||||
use rustc_front::util::is_comparison_binop;
|
||||
use syntax::codemap::Span;
|
||||
use syntax::ast::Lit_::*;
|
||||
|
||||
use utils::span_lint;
|
||||
|
||||
|
|
|
@ -13,6 +13,16 @@ use std::ops::Deref;
|
|||
use self::Constant::*;
|
||||
use self::FloatWidth::*;
|
||||
|
||||
use syntax::ast::Lit_::*;
|
||||
use syntax::ast::Lit_;
|
||||
use syntax::ast::LitIntType::*;
|
||||
use syntax::ast::LitIntType;
|
||||
use syntax::ast::{UintTy, FloatTy, StrStyle};
|
||||
use syntax::ast::UintTy::*;
|
||||
use syntax::ast::FloatTy::*;
|
||||
use syntax::ast::Sign::{self, Plus, Minus};
|
||||
|
||||
|
||||
#[derive(PartialEq, Eq, Debug, Copy, Clone)]
|
||||
pub enum FloatWidth {
|
||||
Fw32,
|
||||
|
|
|
@ -5,6 +5,9 @@ use syntax::codemap::{Span, Spanned};
|
|||
use rustc::middle::def_id::DefId;
|
||||
use rustc::middle::ty::{self, MethodTraitItemId, ImplOrTraitItemId};
|
||||
|
||||
use syntax::ast::Lit_::*;
|
||||
use syntax::ast::Lit;
|
||||
|
||||
use utils::{get_item_name, snippet, span_lint, walk_ptrs_ty};
|
||||
|
||||
declare_lint!(pub LEN_ZERO, Warn,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#![feature(plugin_registrar, box_syntax)]
|
||||
#![feature(rustc_private, core, collections)]
|
||||
#![feature(str_split_at, num_bits_bytes)]
|
||||
#![feature(num_bits_bytes)]
|
||||
#![allow(unknown_lints)]
|
||||
|
||||
#[macro_use]
|
||||
|
|
|
@ -7,6 +7,7 @@ use rustc::middle::def::DefLocal;
|
|||
use consts::{constant_simple, Constant};
|
||||
use rustc::front::map::Node::{NodeBlock};
|
||||
use std::collections::{HashSet,HashMap};
|
||||
use syntax::ast::Lit_::*;
|
||||
|
||||
use utils::{snippet, span_lint, get_parent_expr, match_trait_method, match_type,
|
||||
in_external_macro, expr_block, span_help_and_lint, is_integer_literal};
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
use rustc::lint::*;
|
||||
use rustc_front::hir::*;
|
||||
|
||||
use syntax::ast::Lit_::*;
|
||||
|
||||
use utils::{span_lint, snippet};
|
||||
|
||||
declare_lint! {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use rustc::lint::*;
|
||||
use rustc_front::hir::*;
|
||||
use syntax::codemap::Spanned;
|
||||
|
||||
use syntax::ast::Lit_::*;
|
||||
use utils::span_lint;
|
||||
|
||||
declare_lint!(pub PRECEDENCE, Warn,
|
||||
|
|
|
@ -5,6 +5,9 @@ use rustc_front::util::{is_comparison_binop, binop_to_string};
|
|||
use syntax::codemap::Span;
|
||||
use rustc_front::visit::{FnKind, Visitor, walk_ty};
|
||||
use rustc::middle::ty;
|
||||
use syntax::ast::IntTy::*;
|
||||
use syntax::ast::UintTy::*;
|
||||
use syntax::ast::FloatTy::*;
|
||||
|
||||
use utils::{match_type, snippet, span_lint, span_help_and_lint, in_macro, in_external_macro};
|
||||
use utils::{LL_PATH, VEC_PATH};
|
||||
|
|
|
@ -2,6 +2,8 @@ use rustc::lint::*;
|
|||
use rustc_front::hir::*;
|
||||
use syntax::codemap::Span;
|
||||
|
||||
use syntax::ast::Lit_::*;
|
||||
|
||||
use unicode_normalization::UnicodeNormalization;
|
||||
|
||||
use utils::{snippet, span_help_and_lint};
|
||||
|
|
|
@ -6,6 +6,7 @@ use rustc::front::map::Node::*;
|
|||
use rustc::middle::def_id::DefId;
|
||||
use rustc::middle::ty;
|
||||
use std::borrow::Cow;
|
||||
use syntax::ast::Lit_::*;
|
||||
|
||||
// module DefPaths for certain structs/enums we check for
|
||||
pub const OPTION_PATH: [&'static str; 3] = ["core", "option", "Option"];
|
||||
|
|
|
@ -11,6 +11,12 @@ use syntax::parse::token::InternedString;
|
|||
use syntax::ptr::P;
|
||||
use syntax::codemap::{Spanned, COMMAND_LINE_SP};
|
||||
|
||||
use syntax::ast::Lit_::*;
|
||||
use syntax::ast::Lit_;
|
||||
use syntax::ast::LitIntType::*;
|
||||
use syntax::ast::StrStyle::*;
|
||||
use syntax::ast::Sign::*;
|
||||
|
||||
use clippy::consts::{constant_simple, Constant};
|
||||
use clippy::consts::Constant::*;
|
||||
|
||||
|
|
Loading…
Reference in a new issue