Reintroduce extern crate
for non-Cargo dependencies.
This commit is contained in:
parent
4aaef72fa0
commit
9219fc6c5c
130 changed files with 723 additions and 695 deletions
|
@ -9,11 +9,11 @@
|
|||
// except according to those terms.
|
||||
//
|
||||
|
||||
use rustc::hir;
|
||||
use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
|
||||
use rustc::{declare_tool_lint, lint_array};
|
||||
use syntax::ast;
|
||||
use syntax::source_map::Span;
|
||||
use crate::rustc::hir;
|
||||
use crate::rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
|
||||
use crate::rustc::{declare_tool_lint, lint_array};
|
||||
use crate::syntax::ast;
|
||||
use crate::syntax::source_map::Span;
|
||||
use crate::utils::span_lint;
|
||||
|
||||
/// **What it does:** it lints if an exported function, method, trait method with default impl,
|
||||
|
@ -85,7 +85,7 @@ fn check_missing_inline_attrs(cx: &LateContext<'_, '_>,
|
|||
}
|
||||
|
||||
fn is_executable<'a, 'tcx>(cx: &LateContext<'a, 'tcx>) -> bool {
|
||||
use rustc::session::config::CrateType;
|
||||
use crate::rustc::session::config::CrateType;
|
||||
|
||||
cx.tcx.sess.crate_types.get().iter().any(|t: &CrateType| {
|
||||
match t {
|
||||
|
@ -155,7 +155,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for MissingInline {
|
|||
}
|
||||
|
||||
fn check_impl_item(&mut self, cx: &LateContext<'a, 'tcx>, impl_item: &'tcx hir::ImplItem) {
|
||||
use rustc::ty::{TraitContainer, ImplContainer};
|
||||
use crate::rustc::ty::{TraitContainer, ImplContainer};
|
||||
if is_executable(cx) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue