about summary refs log tree commit diff
path: root/src/rustc/middle/borrowck/categorization.rs
AgeCommit message (Collapse)AuthorLines
2012-08-08refactor categorization out of borrowck into its own module.Niko Matsakis-505/+0
first step towards #3148 and #3024.
2012-08-07Implement static typeclass methods. Closes #3132.Michael Sullivan-1/+1
2012-08-07syntax: Rename expr_alt to expr_matchBrian Anderson-1/+1
2012-08-06make `ref x` bindings produce region ptrs and fix various minor bugsNiko Matsakis-4/+6
we now detect inconsistent modes, binding names, and various other errors. typeck/trans integration is mostly done. borrowck not so much. more tests needed.
2012-08-06Convert alt to match. Stop parsing altBrian Anderson-20/+20
2012-08-05Switch alts to use arrowsBrian Anderson-50/+48
2012-08-03rustc: Merge fn& and fn in favor of fn&.Patrick Walton-1/+1
This is a step on the way to moving the function "proto" sigil out front.
2012-08-03rustc: Parse and typecheck repeating vector expressions; e.g. [ 0, ..512 ]Patrick Walton-1/+1
2012-08-02Purge placement new; Make borrowck know about unary move.Niko Matsakis-2/+9
cc #3071
2012-08-01Convert ret to returnBrian Anderson-11/+11
2012-07-31rustc: Implement unary move. Closes #917.Patrick Walton-1/+2
2012-07-30Change syntax extension syntax: `#m[...]` -> `m!{...}`.Paul Stansifer-12/+12
2012-07-30Fix #2979: inference for lifetimes of & expressionsNiko Matsakis-7/+7
What we now do is to create a region variable for each & expression (and also each borrow). The lifetime of this variable will be checked by borrowck to ensure it is not greater than the lifetime of the underlying data. This both leads to shorter lifetimes in some cases but also longer in others, such as taking the address to the interior of unique boxes tht are rooted in region pointers (e.g., returning a pointer to the interior of a sendable map). This may lead to issue #2977 if the rvalue is not POD, because we may drop the data in trans sooner than borrowck expects us to. Need to work out precisely where that fix ought to occur.
2012-07-27Correctly forbid upvars in nested impls, traits and classesTim Chevalier-4/+4
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-26rustc: Fix cross-crate max/min-class-style constructorsPatrick Walton-1/+1
2012-07-25make unique pointers inherit mutability from ownerNiko Matsakis-9/+37
2012-07-25correct treatment of mutability for deref'd componentsNiko Matsakis-7/+18
Fixes #2980
2012-07-23rustc: Max/min classes: Add struct literal syntaxPatrick Walton-1/+1
2012-07-17borrow from @[] vectors (cc #2797)Niko Matsakis-5/+11
2012-07-14remove typestate from code, tests, and docsNiko Matsakis-2/+2
2012-07-14Tear out ty_str and ty_vec.Michael Sullivan-3/+2
2012-07-06For #2229, recognize 'again' in place of 'cont', final change pending snapshot.Graydon Hoare-1/+1
2012-07-04convert doc-attributes to doc-comments using ↵Gareth Daniel Smith-38/+37
./src/etc/sugarise-doc-comments.py (and manually tweaking) - for issue #2498
2012-07-01Convert to new closure syntaxBrian Anderson-12/+10
2012-06-30Eliminate usages of old sugared call syntaxBrian Anderson-9/+9
2012-06-26Change 'native' and 'crust' to 'extern'.Graydon Hoare-1/+1
This comes with a terminology change. All linkage-symbols are 'extern' now, including rust syms in other crates. Some extern ABIs are merely "foreign". The term "native" is retired, not clear/useful. What was "crust" is now "extern" applied to a _definition_. This is a bit of an overloading, but should be unambiguous: it means that the definition should be made available to some non-rust ABI.
2012-06-24Remove resourcesTim Chevalier-4/+0
Also fixed shapes for classes with dtors, as well as handling offsets for classes with dtors correctly in take glue. Closes #2485
2012-06-21Issue #2657: track mutability of bindings, also prevent move from bindingsNiko Matsakis-5/+9
2012-06-20Remove bind. Issue #2189Brian Anderson-1/+1
2012-06-18Add 'do' expressionsBrian Anderson-1/+1
2012-06-13Box AST identsBrian Anderson-3/+4
2012-06-12Treat enums with one variant specially in borrowck: #2573Niko Matsakis-5/+7
2012-06-06some (very little) work on commentingNiko Matsakis-1/+9
2012-06-04handle fixed-length vecs in borrowck categorizationNiko Matsakis-16/+29
2012-06-02improve borrowck to handle some frankly rather tricky casesNiko Matsakis-11/+22
- receivers of method calls are also borrowed - by-val arguments are also borrowed (needs tests) - assignment to components can interfere with loans
2012-06-01break up borrowck into modules and begin to document how it worksNiko Matsakis-0/+421