Skip to content

Commit 91a096a

Browse files
move middle::liveness to rustc_passes
1 parent 9e35a28 commit 91a096a

File tree

4 files changed

+15
-15
lines changed

4 files changed

+15
-15
lines changed

src/librustc/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ pub mod middle {
111111
pub mod intrinsicck;
112112
pub mod lib_features;
113113
pub mod lang_items;
114-
pub mod liveness;
115114
pub mod mem_categorization;
116115
pub mod privacy;
117116
pub mod reachable;

src/librustc_interface/passes.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -781,7 +781,6 @@ pub fn default_provide(providers: &mut ty::query::Providers<'_>) {
781781
traits::provide(providers);
782782
stability::provide(providers);
783783
middle::intrinsicck::provide(providers);
784-
middle::liveness::provide(providers);
785784
reachable::provide(providers);
786785
rustc_passes::provide(providers);
787786
rustc_traits::provide(providers);

src/librustc_passes/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ pub mod ast_validation;
2222
pub mod hir_stats;
2323
pub mod layout_test;
2424
pub mod loops;
25+
mod liveness;
2526

2627
pub fn provide(providers: &mut Providers<'_>) {
2728
loops::provide(providers);
29+
liveness::provide(providers);
2830
}

src/librustc/middle/liveness.rs renamed to src/librustc_passes/liveness.rs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -96,17 +96,17 @@
9696
use self::LiveNodeKind::*;
9797
use self::VarKind::*;
9898

99-
use crate::hir;
100-
use crate::hir::{Expr, HirId};
101-
use crate::hir::def::*;
102-
use crate::hir::def_id::DefId;
103-
use crate::hir::intravisit::{self, Visitor, FnKind, NestedVisitorMap};
104-
use crate::hir::Node;
105-
use crate::hir::ptr::P;
106-
use crate::ty::{self, TyCtxt};
107-
use crate::ty::query::Providers;
108-
use crate::lint;
109-
use crate::util::nodemap::{HirIdMap, HirIdSet};
99+
use rustc::hir;
100+
use rustc::hir::{Expr, HirId};
101+
use rustc::hir::def::*;
102+
use rustc::hir::def_id::DefId;
103+
use rustc::hir::intravisit::{self, Visitor, FnKind, NestedVisitorMap};
104+
use rustc::hir::Node;
105+
use rustc::hir::ptr::P;
106+
use rustc::ty::{self, TyCtxt};
107+
use rustc::ty::query::Providers;
108+
use rustc::lint;
109+
use rustc::util::nodemap::{HirIdMap, HirIdSet};
110110

111111
use errors::Applicability;
112112
use rustc_data_structures::fx::FxIndexMap;
@@ -373,7 +373,7 @@ fn visit_fn<'tcx>(
373373

374374
for param in &body.params {
375375
let is_shorthand = match param.pat.kind {
376-
crate::hir::PatKind::Struct(..) => true,
376+
rustc::hir::PatKind::Struct(..) => true,
377377
_ => false,
378378
};
379379
param.pat.each_binding(|_bm, hir_id, _x, ident| {
@@ -411,7 +411,7 @@ fn add_from_pat(ir: &mut IrMaps<'_>, pat: &P<hir::Pat>) {
411411
let mut pats = VecDeque::new();
412412
pats.push_back(pat);
413413
while let Some(pat) = pats.pop_front() {
414-
use crate::hir::PatKind::*;
414+
use rustc::hir::PatKind::*;
415415
match &pat.kind {
416416
Binding(.., inner_pat) => {
417417
pats.extend(inner_pat.iter());

0 commit comments

Comments
 (0)