mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 02:57:37 +00:00
fix ui-fulldeps fallout
This commit is contained in:
parent
ebfd8673a7
commit
01563682c6
@ -4,6 +4,7 @@ extern crate rustc;
|
||||
extern crate rustc_codegen_utils;
|
||||
#[macro_use]
|
||||
extern crate rustc_data_structures;
|
||||
extern crate rustc_hir;
|
||||
extern crate rustc_target;
|
||||
extern crate rustc_driver;
|
||||
extern crate rustc_span;
|
||||
@ -65,7 +66,7 @@ impl CodegenBackend for TheBackend {
|
||||
_metadata: EncodedMetadata,
|
||||
_need_metadata_module: bool,
|
||||
) -> Box<dyn Any> {
|
||||
use rustc::hir::def_id::LOCAL_CRATE;
|
||||
use rustc_hir::def_id::LOCAL_CRATE;
|
||||
|
||||
Box::new(tcx.crate_name(LOCAL_CRATE) as Symbol)
|
||||
}
|
||||
|
@ -4,10 +4,13 @@
|
||||
#[macro_use] extern crate rustc;
|
||||
#[macro_use] extern crate rustc_session;
|
||||
extern crate rustc_driver;
|
||||
extern crate rustc_hir;
|
||||
extern crate rustc_span;
|
||||
extern crate syntax;
|
||||
|
||||
use rustc::hir::{self, intravisit, Node};
|
||||
use rustc::hir::intravisit;
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::Node;
|
||||
use rustc::lint::{LateContext, LintPass, LintArray, LateLintPass, LintContext};
|
||||
use rustc_driver::plugin::Registry;
|
||||
use rustc_span::source_map;
|
||||
|
@ -5,10 +5,10 @@
|
||||
#[macro_use] extern crate rustc;
|
||||
#[macro_use] extern crate rustc_session;
|
||||
extern crate rustc_driver;
|
||||
extern crate rustc_hir;
|
||||
extern crate rustc_span;
|
||||
extern crate syntax;
|
||||
|
||||
use rustc::hir;
|
||||
use rustc::lint::{LateContext, LintContext, LintPass, LateLintPass};
|
||||
use rustc_driver::plugin::Registry;
|
||||
use rustc_span::symbol::Symbol;
|
||||
@ -25,7 +25,7 @@ macro_rules! fake_lint_pass {
|
||||
}
|
||||
|
||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for $struct {
|
||||
fn check_crate(&mut self, cx: &LateContext, krate: &hir::Crate) {
|
||||
fn check_crate(&mut self, cx: &LateContext, krate: &rustc_hir::Crate) {
|
||||
$(
|
||||
if !attr::contains_name(&krate.attrs, $attr) {
|
||||
cx.span_lint(CRATE_NOT_OKAY, krate.span,
|
||||
|
@ -6,10 +6,10 @@
|
||||
#[macro_use] extern crate rustc;
|
||||
#[macro_use] extern crate rustc_session;
|
||||
extern crate rustc_driver;
|
||||
extern crate rustc_hir;
|
||||
extern crate rustc_span;
|
||||
extern crate syntax;
|
||||
|
||||
use rustc::hir;
|
||||
use rustc::lint::{LateContext, LintContext, LintPass, LateLintPass, LintArray};
|
||||
use rustc_driver::plugin::Registry;
|
||||
use rustc_span::symbol::Symbol;
|
||||
@ -24,7 +24,7 @@ declare_lint! {
|
||||
declare_lint_pass!(Pass => [CRATE_NOT_OKAY]);
|
||||
|
||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
|
||||
fn check_crate(&mut self, cx: &LateContext, krate: &hir::Crate) {
|
||||
fn check_crate(&mut self, cx: &LateContext, krate: &rustc_hir::Crate) {
|
||||
if !attr::contains_name(&krate.attrs, Symbol::intern("crate_okay")) {
|
||||
cx.span_lint(CRATE_NOT_OKAY, krate.span,
|
||||
"crate is not marked with #![crate_okay]");
|
||||
|
@ -7,8 +7,8 @@
|
||||
#[macro_use] extern crate rustc;
|
||||
#[macro_use] extern crate rustc_session;
|
||||
extern crate rustc_driver;
|
||||
extern crate rustc_hir;
|
||||
|
||||
use rustc::hir;
|
||||
use rustc::lint::{LateContext, LintContext, LintPass, LateLintPass, LintArray, LintId};
|
||||
use rustc_driver::plugin::Registry;
|
||||
|
||||
@ -19,7 +19,7 @@ declare_lint!(PLEASE_LINT, Warn, "Warn about items named 'pleaselintme'");
|
||||
declare_lint_pass!(Pass => [TEST_LINT, PLEASE_LINT]);
|
||||
|
||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
|
||||
fn check_item(&mut self, cx: &LateContext, it: &hir::Item) {
|
||||
fn check_item(&mut self, cx: &LateContext, it: &rustc_hir::Item) {
|
||||
match &*it.ident.as_str() {
|
||||
"lintme" => cx.span_lint(TEST_LINT, it.span, "item is named 'lintme'"),
|
||||
"pleaselintme" => cx.span_lint(PLEASE_LINT, it.span, "item is named 'pleaselintme'"),
|
||||
|
Loading…
Reference in New Issue
Block a user