diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2017-01-25 16:24:00 -0500 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2017-01-25 16:24:00 -0500 |
| commit | 282f7a3c44a428c26155b4686ad95e802fcd4158 (patch) | |
| tree | cc2547f426c32de8fbfd959c8226c397c48f36f7 /src/librustc_const_eval | |
| parent | 80b5f98d038346f9d4283b19fb117534d289e60f (diff) | |
rename `Tables` to `TypeckTables`
Diffstat (limited to 'src/librustc_const_eval')
| -rw-r--r-- | src/librustc_const_eval/check_match.rs | 2 | ||||
| -rw-r--r-- | src/librustc_const_eval/eval.rs | 14 | ||||
| -rw-r--r-- | src/librustc_const_eval/pattern.rs | 6 |
3 files changed, 11 insertions, 11 deletions
diff --git a/src/librustc_const_eval/check_match.rs b/src/librustc_const_eval/check_match.rs index 52f332a30c0..a6452a3f031 100644 --- a/src/librustc_const_eval/check_match.rs +++ b/src/librustc_const_eval/check_match.rs @@ -69,7 +69,7 @@ fn create_e0004<'a>(sess: &'a Session, sp: Span, error_message: String) -> Diagn struct MatchVisitor<'a, 'tcx: 'a> { tcx: TyCtxt<'a, 'tcx, 'tcx>, - tables: &'a ty::Tables<'tcx>, + tables: &'a ty::TypeckTables<'tcx>, param_env: &'a ty::ParameterEnvironment<'tcx> } diff --git a/src/librustc_const_eval/eval.rs b/src/librustc_const_eval/eval.rs index c899d2109f5..2325c37bc40 100644 --- a/src/librustc_const_eval/eval.rs +++ b/src/librustc_const_eval/eval.rs @@ -52,7 +52,7 @@ macro_rules! math { fn lookup_variant_by_id<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, variant_def: DefId) - -> Option<(&'tcx Expr, Option<&'a ty::Tables<'tcx>>)> { + -> Option<(&'tcx Expr, Option<&'a ty::TypeckTables<'tcx>>)> { if let Some(variant_node_id) = tcx.map.as_local_node_id(variant_def) { let enum_node_id = tcx.map.get_parent(variant_node_id); if let Some(ast_map::NodeItem(it)) = tcx.map.find(enum_node_id) { @@ -81,7 +81,7 @@ pub fn lookup_const_by_id<'a, 'tcx: 'a>(tcx: TyCtxt<'a, 'tcx, 'tcx>, def_id: DefId, substs: Option<&'tcx Substs<'tcx>>) -> Option<(&'tcx Expr, - Option<&'a ty::Tables<'tcx>>, + Option<&'a ty::TypeckTables<'tcx>>, Option<ty::Ty<'tcx>>)> { if let Some(node_id) = tcx.map.as_local_node_id(def_id) { match tcx.map.find(node_id) { @@ -154,7 +154,7 @@ pub fn lookup_const_by_id<'a, 'tcx: 'a>(tcx: TyCtxt<'a, 'tcx, 'tcx>, } fn lookup_const_fn_by_id<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, def_id: DefId) - -> Option<(&'tcx hir::Body, Option<&'a ty::Tables<'tcx>>)> + -> Option<(&'tcx hir::Body, Option<&'a ty::TypeckTables<'tcx>>)> { if let Some(node_id) = tcx.map.as_local_node_id(def_id) { FnLikeNode::from_node(tcx.map.get(node_id)).and_then(|fn_like| { @@ -226,7 +226,7 @@ pub fn note_const_eval_err<'a, 'tcx>( pub struct ConstContext<'a, 'tcx: 'a> { tcx: TyCtxt<'a, 'tcx, 'tcx>, - tables: Option<&'a ty::Tables<'tcx>>, + tables: Option<&'a ty::TypeckTables<'tcx>>, fn_args: Option<DefIdMap<ConstVal>> } @@ -240,7 +240,7 @@ impl<'a, 'tcx> ConstContext<'a, 'tcx> { } } - pub fn with_tables(tcx: TyCtxt<'a, 'tcx, 'tcx>, tables: &'a ty::Tables<'tcx>) -> Self { + pub fn with_tables(tcx: TyCtxt<'a, 'tcx, 'tcx>, tables: &'a ty::TypeckTables<'tcx>) -> Self { ConstContext { tcx: tcx, tables: Some(tables), @@ -920,10 +920,10 @@ fn infer<'a, 'tcx>(i: ConstInt, fn resolve_trait_associated_const<'a, 'tcx: 'a>( tcx: TyCtxt<'a, 'tcx, 'tcx>, trait_item_id: DefId, - default_value: Option<(&'tcx Expr, Option<&'a ty::Tables<'tcx>>, Option<ty::Ty<'tcx>>)>, + default_value: Option<(&'tcx Expr, Option<&'a ty::TypeckTables<'tcx>>, Option<ty::Ty<'tcx>>)>, trait_id: DefId, rcvr_substs: &'tcx Substs<'tcx> -) -> Option<(&'tcx Expr, Option<&'a ty::Tables<'tcx>>, Option<ty::Ty<'tcx>>)> +) -> Option<(&'tcx Expr, Option<&'a ty::TypeckTables<'tcx>>, Option<ty::Ty<'tcx>>)> { let trait_ref = ty::Binder(ty::TraitRef::new(trait_id, rcvr_substs)); debug!("resolve_trait_associated_const: trait_ref={:?}", diff --git a/src/librustc_const_eval/pattern.rs b/src/librustc_const_eval/pattern.rs index 3235e06b806..24c795befa3 100644 --- a/src/librustc_const_eval/pattern.rs +++ b/src/librustc_const_eval/pattern.rs @@ -264,13 +264,13 @@ impl<'tcx> fmt::Display for Pattern<'tcx> { pub struct PatternContext<'a, 'gcx: 'tcx, 'tcx: 'a> { pub tcx: TyCtxt<'a, 'gcx, 'tcx>, - pub tables: &'a ty::Tables<'gcx>, + pub tables: &'a ty::TypeckTables<'gcx>, pub errors: Vec<PatternError>, } impl<'a, 'gcx, 'tcx> Pattern<'tcx> { pub fn from_hir(tcx: TyCtxt<'a, 'gcx, 'tcx>, - tables: &'a ty::Tables<'gcx>, + tables: &'a ty::TypeckTables<'gcx>, pat: &hir::Pat) -> Self { let mut pcx = PatternContext::new(tcx, tables); let result = pcx.lower_pattern(pat); @@ -283,7 +283,7 @@ impl<'a, 'gcx, 'tcx> Pattern<'tcx> { } impl<'a, 'gcx, 'tcx> PatternContext<'a, 'gcx, 'tcx> { - pub fn new(tcx: TyCtxt<'a, 'gcx, 'tcx>, tables: &'a ty::Tables<'gcx>) -> Self { + pub fn new(tcx: TyCtxt<'a, 'gcx, 'tcx>, tables: &'a ty::TypeckTables<'gcx>) -> Self { PatternContext { tcx: tcx, tables: tables, errors: vec![] } } |
