Skip to content

Commit

Permalink
fix ui-fulldeps fallout
Browse files Browse the repository at this point in the history
  • Loading branch information
Centril committed Jan 5, 2020
1 parent ebfd867 commit 0156368
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)
}
Expand Down
5 changes: 4 additions & 1 deletion src/test/ui-fulldeps/auxiliary/issue-40001-plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/test/ui-fulldeps/auxiliary/lint-for-crate-rpass.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions src/test/ui-fulldeps/auxiliary/lint-for-crate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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]");
Expand Down
4 changes: 2 additions & 2 deletions src/test/ui-fulldeps/auxiliary/lint-group-plugin-test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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'"),
Expand Down

0 comments on commit 0156368

Please sign in to comment.