move middle::liveness to rustc_passes
This commit is contained in:
parent
9e35a2811d
commit
91a096a9b8
@ -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());
|
Loading…
x
Reference in New Issue
Block a user