Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 37ba66a

Browse files
committedMar 3, 2016
Rename middle::ty::ctxt to TyCtxt
1 parent 7cee8b9 commit 37ba66a

File tree

131 files changed

+703
-706
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

131 files changed

+703
-706
lines changed
 

‎src/librustc/dep_graph/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
use self::thread::{DepGraphThreadData, DepMessage};
1212
use middle::def_id::DefId;
13-
use middle::ty;
13+
use middle::ty::TyCtxt;
1414
use rustc_front::hir;
1515
use rustc_front::intravisit::Visitor;
1616
use std::rc::Rc;
@@ -181,13 +181,13 @@ pub use self::query::DepGraphQuery;
181181
/// read edge from the corresponding AST node. This is used in
182182
/// compiler passes to automatically record the item that they are
183183
/// working on.
184-
pub fn visit_all_items_in_krate<'tcx,V,F>(tcx: &ty::ctxt<'tcx>,
184+
pub fn visit_all_items_in_krate<'tcx,V,F>(tcx: &TyCtxt<'tcx>,
185185
mut dep_node_fn: F,
186186
visitor: &mut V)
187187
where F: FnMut(DefId) -> DepNode, V: Visitor<'tcx>
188188
{
189189
struct TrackingVisitor<'visit, 'tcx: 'visit, F: 'visit, V: 'visit> {
190-
tcx: &'visit ty::ctxt<'tcx>,
190+
tcx: &'visit TyCtxt<'tcx>,
191191
dep_node_fn: &'visit mut F,
192192
visitor: &'visit mut V
193193
}

‎src/librustc/lint/context.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ use self::TargetLint::*;
2727

2828
use dep_graph::DepNode;
2929
use middle::privacy::AccessLevels;
30-
use middle::ty;
30+
use middle::ty::TyCtxt;
3131
use session::{config, early_error, Session};
3232
use lint::{Level, LevelSource, Lint, LintId, LintArray, LintPass};
3333
use lint::{EarlyLintPass, EarlyLintPassObject, LateLintPass, LateLintPassObject};
@@ -298,7 +298,7 @@ impl LintStore {
298298
/// Context for lint checking after type checking.
299299
pub struct LateContext<'a, 'tcx: 'a> {
300300
/// Type context we're checking in.
301-
pub tcx: &'a ty::ctxt<'tcx>,
301+
pub tcx: &'a TyCtxt<'tcx>,
302302

303303
/// The crate being checked.
304304
pub krate: &'a hir::Crate,
@@ -662,7 +662,7 @@ impl<'a> EarlyContext<'a> {
662662
}
663663

664664
impl<'a, 'tcx> LateContext<'a, 'tcx> {
665-
fn new(tcx: &'a ty::ctxt<'tcx>,
665+
fn new(tcx: &'a TyCtxt<'tcx>,
666666
krate: &'a hir::Crate,
667667
access_levels: &'a AccessLevels) -> LateContext<'a, 'tcx> {
668668
// We want to own the lint store, so move it out of the session.
@@ -1249,7 +1249,7 @@ fn check_lint_name_cmdline(sess: &Session, lint_cx: &LintStore,
12491249
/// Perform lint checking on a crate.
12501250
///
12511251
/// Consumes the `lint_store` field of the `Session`.
1252-
pub fn check_crate(tcx: &ty::ctxt, access_levels: &AccessLevels) {
1252+
pub fn check_crate(tcx: &TyCtxt, access_levels: &AccessLevels) {
12531253
let _task = tcx.dep_graph.in_task(DepNode::LateLintCheck);
12541254

12551255
let krate = tcx.map.krate();

0 commit comments

Comments
 (0)