Skip to content

Commit f5324d2

Browse files
committed
rustc::middle::typeck::check::wf debug instrumentation and a FIXME comment.
The FIXME comment may be immediately relevant to a bug I am having right now when attempting to compile libsyntax.
1 parent c87a033 commit f5324d2

File tree

1 file changed

+11
-2
lines changed
  • src/librustc/middle/typeck/check

1 file changed

+11
-2
lines changed

src/librustc/middle/typeck/check/wf.rs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,12 @@ impl<'ccx, 'tcx> CheckTypeWellFormedVisitor<'ccx, 'tcx> {
171171
item: &ast::Item)
172172
{
173173
self.with_fcx(item, |this, fcx| {
174+
// FIXME (pnkfelix): what is the "extent" of an item impl?
175+
// This seems fundamentally different from the dynamic
176+
// extent represented by a block or a function body.
177+
//
178+
// For now, just leaving as the default you get via
179+
// `fn CodeExtent::from_node_id`.
174180
let item_scope = region::CodeExtent::from_node_id(item.id);
175181

176182
let mut bounds_checker = BoundsChecker::new(fcx,
@@ -262,8 +268,11 @@ impl<'cx,'tcx> BoundsChecker<'cx,'tcx> {
262268
scope: region::CodeExtent,
263269
cache: Option<&'cx mut HashSet<Ty<'tcx>>>)
264270
-> BoundsChecker<'cx,'tcx> {
265-
BoundsChecker { fcx: fcx, span: span, scope: scope,
266-
cache: cache, binding_count: 0 }
271+
let ret = BoundsChecker { fcx: fcx, span: span, scope: scope,
272+
cache: cache, binding_count: 0 };
273+
debug!("BoundsChecker::new returns b with: b.scope: {} b.binding_count: {}",
274+
ret.scope, ret.binding_count);
275+
ret
267276
}
268277

269278
pub fn check_trait_ref(&mut self, trait_ref: &ty::TraitRef<'tcx>) {

0 commit comments

Comments
 (0)