Skip to content
Permalink
Browse files

move middle::liveness to rustc_passes

  • Loading branch information...
Mark-Simulacrum committed Oct 4, 2019
1 parent 9e35a28 commit 91a096a9b8c05011c1a76e7ceb578000ce1e91f6
@@ -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;
@@ -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);
@@ -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);
}
@@ -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;
@@ -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| {
@@ -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());

0 comments on commit 91a096a

Please sign in to comment.
You can’t perform that action at this time.