cargo fmt

This commit is contained in:
Philipp Hansch 2019-01-23 07:32:58 +01:00
parent aed001b8d4
commit d0d7c5e922
No known key found for this signature in database
GPG Key ID: B6FA06A6E0E2665B
2 changed files with 3 additions and 4 deletions

View File

@ -1,8 +1,7 @@
use crate::utils::{is_entrypoint_fn, span_lint};
use rustc::hir;
use rustc::hir::intravisit::FnKind;
use rustc::hir::{Body, Constness, FnDecl};
// use rustc::mir::*;
use crate::utils::{is_entrypoint_fn, span_lint};
use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
use rustc::{declare_tool_lint, lint_array};
use rustc_mir::transform::qualify_min_const_fn::is_min_const_fn;

View File

@ -3,7 +3,7 @@ use if_chain::if_chain;
use matches::matches;
use rustc::hir;
use rustc::hir::def::Def;
use rustc::hir::def_id::{DefId, LOCAL_CRATE, CRATE_DEF_INDEX};
use rustc::hir::def_id::{DefId, CRATE_DEF_INDEX, LOCAL_CRATE};
use rustc::hir::intravisit::{NestedVisitorMap, Visitor};
use rustc::hir::Node;
use rustc::hir::*;
@ -353,7 +353,7 @@ pub fn method_chain_args<'a>(expr: &'a Expr, methods: &[&str]) -> Option<Vec<&'a
/// Returns true if the provided `def_id` is an entrypoint to a program
pub fn is_entrypoint_fn(cx: &LateContext<'_, '_>, def_id: DefId) -> bool {
if let Some((entry_fn_def_id, _)) = cx.tcx.entry_fn(LOCAL_CRATE) {
return def_id == entry_fn_def_id
return def_id == entry_fn_def_id;
}
false
}