rust/src/libsyntax
Tim Chevalier a0d05844ed Correctly forbid upvars in nested impls, traits and classes
Previously, resolve was allowing impls, traits or classes that were
nested within a fn to refer to upvars, as well as referring to type
parameters bound by the fn. Fixing this required adding a new kind of
def: def_typaram_binder, which can refer to any of an impl, trait or
class that has bound ty params. resolve uses this to enforce that
methods can refer to their parent item's type parameters, but not to
outer items' type parameters; other stages ignore it. I also made
sure that impl, trait and class methods get checked inside a
MethodRibKind thing so as to forbid upvars, and changed the definition
of MethodRibKind so that its second argument is an optional node_id
(so that required trait method signatures can be checked with a
MethodRibKind as well).
2012-07-27 17:31:42 -07:00
..
ext Merge branch 'incoming' of github.com:mozilla/rust 2012-07-26 16:16:28 -07:00
parse Make parsing about 0.3 seconds faster. 2012-07-26 11:37:57 -07:00
print rustc: Don't require that structs have constructors 2012-07-24 15:29:51 -07:00
util Make std::map require const keys. 2012-05-31 13:55:54 -07:00
ast_map.rs Support attributes on class ctors and dtors 2012-07-17 12:40:59 -07:00
ast_util.rs Correctly forbid upvars in nested impls, traits and classes 2012-07-27 17:31:42 -07:00
ast.rs Correctly forbid upvars in nested impls, traits and classes 2012-07-27 17:31:42 -07:00
attr.rs Add #[inline(never)], and also fixed inlining on vec::push 2012-07-26 11:37:57 -07:00
codemap.rs Move the world over to using the new style string literals and types. Closes #2907. 2012-07-14 01:03:43 -07:00
diagnostic.rs diagnostic: only print color if output is for the screen 2012-07-26 17:05:13 -07:00
fold.rs rustc: Don't require that structs have constructors 2012-07-24 15:29:51 -07:00
parse.rs Compiled a bounded version of pingpong. 2012-07-25 12:12:25 -07:00
syntax.rc Nomenclature fixes in the lint checker. Fewer double-negatives. 2012-07-26 17:08:33 -07:00
visit.rs rustc: Don't require that structs have constructors 2012-07-24 15:29:51 -07:00