Skip to content

Commit

Permalink
move middle::liveness to rustc_passes
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark-Simulacrum committed Oct 4, 2019
1 parent 9e35a28 commit 91a096a
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
1 change: 0 additions & 1 deletion src/librustc/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ pub mod middle {
pub mod intrinsicck;
pub mod lib_features;
pub mod lang_items;
pub mod liveness;
pub mod mem_categorization;
pub mod privacy;
pub mod reachable;
Expand Down
1 change: 0 additions & 1 deletion src/librustc_interface/passes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,6 @@ pub fn default_provide(providers: &mut ty::query::Providers<'_>) {
traits::provide(providers);
stability::provide(providers);
middle::intrinsicck::provide(providers);
middle::liveness::provide(providers);
reachable::provide(providers);
rustc_passes::provide(providers);
rustc_traits::provide(providers);
Expand Down
2 changes: 2 additions & 0 deletions src/librustc_passes/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ pub mod ast_validation;
pub mod hir_stats;
pub mod layout_test;
pub mod loops;
mod liveness;

pub fn provide(providers: &mut Providers<'_>) {
loops::provide(providers);
liveness::provide(providers);
}
26 changes: 13 additions & 13 deletions src/librustc/middle/liveness.rs → src/librustc_passes/liveness.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,17 +96,17 @@
use self::LiveNodeKind::*;
use self::VarKind::*;

use crate::hir;
use crate::hir::{Expr, HirId};
use crate::hir::def::*;
use crate::hir::def_id::DefId;
use crate::hir::intravisit::{self, Visitor, FnKind, NestedVisitorMap};
use crate::hir::Node;
use crate::hir::ptr::P;
use crate::ty::{self, TyCtxt};
use crate::ty::query::Providers;
use crate::lint;
use crate::util::nodemap::{HirIdMap, HirIdSet};
use rustc::hir;
use rustc::hir::{Expr, HirId};
use rustc::hir::def::*;
use rustc::hir::def_id::DefId;
use rustc::hir::intravisit::{self, Visitor, FnKind, NestedVisitorMap};
use rustc::hir::Node;
use rustc::hir::ptr::P;
use rustc::ty::{self, TyCtxt};
use rustc::ty::query::Providers;
use rustc::lint;
use rustc::util::nodemap::{HirIdMap, HirIdSet};

use errors::Applicability;
use rustc_data_structures::fx::FxIndexMap;
Expand Down Expand Up @@ -373,7 +373,7 @@ fn visit_fn<'tcx>(

for param in &body.params {
let is_shorthand = match param.pat.kind {
crate::hir::PatKind::Struct(..) => true,
rustc::hir::PatKind::Struct(..) => true,
_ => false,
};
param.pat.each_binding(|_bm, hir_id, _x, ident| {
Expand Down Expand Up @@ -411,7 +411,7 @@ fn add_from_pat(ir: &mut IrMaps<'_>, pat: &P<hir::Pat>) {
let mut pats = VecDeque::new();
pats.push_back(pat);
while let Some(pat) = pats.pop_front() {
use crate::hir::PatKind::*;
use rustc::hir::PatKind::*;
match &pat.kind {
Binding(.., inner_pat) => {
pats.extend(inner_pat.iter());
Expand Down

0 comments on commit 91a096a

Please sign in to comment.