diff options
| author | Tim Chevalier <[email protected]> | 2011-04-22 11:23:49 -0700 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2011-04-28 13:26:19 -0700 |
| commit | 34dae82b484cd59067aeb102feb643da83cba2be (patch) | |
| tree | ba9e4b14670e7170d4901392a52fe7519b0551cc /src/comp/middle/ty.rs | |
| parent | Reindented things and removed superfluous comments, nothing to see here (diff) | |
| download | rust-34dae82b484cd59067aeb102feb643da83cba2be.tar.xz rust-34dae82b484cd59067aeb102feb643da83cba2be.zip | |
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.
Diffstat (limited to 'src/comp/middle/ty.rs')
| -rw-r--r-- | src/comp/middle/ty.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/comp/middle/ty.rs b/src/comp/middle/ty.rs index f5cea365..47442f2b 100644 --- a/src/comp/middle/ty.rs +++ b/src/comp/middle/ty.rs @@ -46,7 +46,7 @@ type mt = rec(t ty, ast.mutability mut); // Contains information needed to resolve types and (in the future) look up // the types of AST nodes. -type ctxt = rec(@type_store ts); +type ctxt = rec(@type_store ts, session.session sess); type ty_ctxt = ctxt; // Needed for disambiguation from Unify.ctxt. // Convert from method type to function type. Pretty easy; we just drop @@ -200,7 +200,7 @@ fn mk_type_store() -> @type_store { others=map.mk_hashmap[t,t](hasher, eqer)); } -fn mk_ctxt() -> ctxt { ret rec(ts=mk_type_store()); } +fn mk_ctxt(session.session s) -> ctxt { ret rec(ts=mk_type_store(), sess=s); } // Type constructors |