Add a session field to ty_ctxt and change an err to span_err

I changed instantiate to print out a more helpful error message,
which required passing it a session argument. To avoid
threading extra arguments through a lot of functions,
I added a session field to ty_ctxt.
This commit is contained in:
Tim Chevalier 2011-04-22 11:23:49 -07:00 committed by Graydon Hoare
parent f61e77e745
commit 34dae82b48
3 changed files with 18 additions and 12 deletions

View file

@ -80,8 +80,8 @@ fn compile_input(session.session sess,
crate = resolve.resolve_crate(sess, crate);
capture.check_for_captures(sess, crate);
auto ty_cx = ty.mk_ctxt();
auto typeck_result = typeck.check_crate(sess, ty_cx, crate);
auto ty_cx = ty.mk_ctxt(sess);
auto typeck_result = typeck.check_crate(ty_cx, crate);
crate = typeck_result._0;
auto type_cache = typeck_result._1;
// FIXME: uncomment once typestate_check works