Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 697146b

Browse files
committed
use ParamEnv from ty rather than importing
1 parent 226358e commit 697146b

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

src/librustc/infer/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ use middle::lang_items;
2828
use mir::tcx::LvalueTy;
2929
use ty::subst::{Kind, Subst, Substs};
3030
use ty::{TyVid, IntVid, FloatVid};
31-
use ty::{self, ParamEnv, Ty, TyCtxt};
31+
use ty::{self, Ty, TyCtxt};
3232
use ty::error::{ExpectedFound, TypeError, UnconstrainedNumeric};
3333
use ty::fold::{TypeFoldable, TypeFolder, TypeVisitor};
3434
use ty::relate::{Relate, RelateResult, TypeRelation};
@@ -526,7 +526,7 @@ impl<'a, 'gcx, 'tcx> InferCtxtBuilder<'a, 'gcx, 'tcx> {
526526
let tables = tables.map(InferTables::Interned).unwrap_or_else(|| {
527527
fresh_tables.as_ref().map_or(InferTables::Missing, InferTables::InProgress)
528528
});
529-
let param_env = param_env.take().unwrap_or_else(|| ParamEnv::empty());
529+
let param_env = param_env.take().unwrap_or_else(|| ty::ParamEnv::empty());
530530
global_tcx.enter_local(arena, |tcx| f(InferCtxt {
531531
tcx: tcx,
532532
tables: tables,

src/librustc_borrowck/borrowck/mir/gather_moves.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// except according to those terms.
1010

1111

12-
use rustc::ty::{self, TyCtxt, ParamEnv};
12+
use rustc::ty::{self, TyCtxt};
1313
use rustc::mir::*;
1414
use rustc::util::nodemap::FxHashMap;
1515
use rustc_data_structures::indexed_vec::{IndexVec};
@@ -191,7 +191,7 @@ pub struct MovePathLookup<'tcx> {
191191
struct MoveDataBuilder<'a, 'tcx: 'a> {
192192
mir: &'a Mir<'tcx>,
193193
tcx: TyCtxt<'a, 'tcx, 'tcx>,
194-
param_env: ParamEnv<'tcx>,
194+
param_env: ty::ParamEnv<'tcx>,
195195
data: MoveData<'tcx>,
196196
}
197197

@@ -203,7 +203,7 @@ pub enum MovePathError {
203203
impl<'a, 'tcx> MoveDataBuilder<'a, 'tcx> {
204204
fn new(mir: &'a Mir<'tcx>,
205205
tcx: TyCtxt<'a, 'tcx, 'tcx>,
206-
param_env: ParamEnv<'tcx>)
206+
param_env: ty::ParamEnv<'tcx>)
207207
-> Self {
208208
let mut move_paths = IndexVec::new();
209209
let mut path_map = IndexVec::new();
@@ -370,15 +370,15 @@ impl<'tcx> MovePathLookup<'tcx> {
370370
impl<'a, 'tcx> MoveData<'tcx> {
371371
pub fn gather_moves(mir: &Mir<'tcx>,
372372
tcx: TyCtxt<'a, 'tcx, 'tcx>,
373-
param_env: ParamEnv<'tcx>)
373+
param_env: ty::ParamEnv<'tcx>)
374374
-> Self {
375375
gather_moves(mir, tcx, param_env)
376376
}
377377
}
378378

379379
fn gather_moves<'a, 'tcx>(mir: &Mir<'tcx>,
380380
tcx: TyCtxt<'a, 'tcx, 'tcx>,
381-
param_env: ParamEnv<'tcx>)
381+
param_env: ty::ParamEnv<'tcx>)
382382
-> MoveData<'tcx> {
383383
let mut builder = MoveDataBuilder::new(mir, tcx, param_env);
384384

src/librustc_passes/consts.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ use rustc::middle::expr_use_visitor as euv;
3838
use rustc::middle::mem_categorization as mc;
3939
use rustc::middle::mem_categorization::Categorization;
4040
use rustc::mir::transform::MirSource;
41-
use rustc::ty::{self, ParamEnv, Ty, TyCtxt};
41+
use rustc::ty::{self, Ty, TyCtxt};
4242
use rustc::traits::Reveal;
4343
use rustc::util::common::ErrorReported;
4444
use rustc::util::nodemap::NodeSet;
@@ -466,7 +466,7 @@ pub fn check_crate<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>) {
466466
in_fn: false,
467467
promotable: false,
468468
mut_rvalue_borrows: NodeSet(),
469-
param_env: ParamEnv::empty(),
469+
param_env: ty::ParamEnv::empty(),
470470
}.as_deep_visitor());
471471
tcx.sess.abort_if_errors();
472472
}

src/librustc_trans/context.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ use partitioning::CodegenUnit;
2424
use type_::Type;
2525
use rustc_data_structures::base_n;
2626
use rustc::ty::subst::Substs;
27-
use rustc::ty::{self, ParamEnv, Ty, TyCtxt};
27+
use rustc::ty::{self, Ty, TyCtxt};
2828
use rustc::ty::layout::{LayoutTyper, TyLayout};
2929
use session::config::NoDebugInfo;
3030
use session::Session;
@@ -321,15 +321,15 @@ impl<'b, 'tcx> SharedCrateContext<'b, 'tcx> {
321321
}
322322

323323
pub fn type_needs_drop(&self, ty: Ty<'tcx>) -> bool {
324-
ty.needs_drop(self.tcx, ParamEnv::empty())
324+
ty.needs_drop(self.tcx, ty::ParamEnv::empty())
325325
}
326326

327327
pub fn type_is_sized(&self, ty: Ty<'tcx>) -> bool {
328-
ty.is_sized(self.tcx, ParamEnv::empty(), DUMMY_SP)
328+
ty.is_sized(self.tcx, ty::ParamEnv::empty(), DUMMY_SP)
329329
}
330330

331331
pub fn type_is_freeze(&self, ty: Ty<'tcx>) -> bool {
332-
ty.is_freeze(self.tcx, ParamEnv::empty(), DUMMY_SP)
332+
ty.is_freeze(self.tcx, ty::ParamEnv::empty(), DUMMY_SP)
333333
}
334334

335335
pub fn exported_symbols<'a>(&'a self) -> &'a NodeSet {

0 commit comments

Comments
 (0)