summary refs log tree commit diff
path: root/src/rustc
AgeCommit message (Collapse)AuthorLines
2012-03-28rustc: Universally quantify regions when calling functions. Un-XFAIL ↵Patrick Walton-118/+106
regions-addr-of-ret.rs.
2012-03-28Allow references to "self" within classesTim Chevalier-32/+81
Allow writing self.f within a class that has a field f. Currently, the compiler accepts either self.f or f. In a future commit I'll require writing self.f and not f. Not sure whether self.f() works if f is a method (making sure that works next).
2012-03-28Update crate URLs to point to interesting things.Graydon Hoare-2/+2
2012-03-28Make sure type_use.rs doesn't get lost in recursive enumsMarijn Haverbeke-7/+12
Closes #2059
2012-03-27Enforce mutability declarations in classes; correct shapes for classesTim Chevalier-34/+132
1. Enforce mutability declarations on class fields. Don't allow any mutation of class fields not declared as mutable (except inside the constructor). 2. Handle classes correctly in shape (treat classes like records).
2012-03-27make type_kind exhaustive, add an entry for type_self (in particular)Niko Matsakis-1/+3
2012-03-27rust: Remove extensions' dependency on the sessionBrian Anderson-12/+10
2012-03-27Emergency safe-ref-checker maintenanceMarijn Haverbeke-82/+92
It still has some big problems, but at least it more or less understands block arguments now. Closes #1925
2012-03-27Move some code over to iterator-for to see how it performs.Marijn Haverbeke-130/+119
2012-03-27Support returning from loop blocksMarijn Haverbeke-51/+186
The code is somewhat invasive, but it seems hard to do this in a clean way, since the design itself involves a bunch of 'action at a distance'. Issue #1819
2012-03-27Support an alternate for syntax that calls a higher-order functionMarijn Haverbeke-78/+123
The last argument of the call must be a block, and the type of this argument must a function returning bool. `break` and `cont` are supported in the body of the block, and return `false` or `true` from the function. When the end of the function is reached, `true` is implicitly returned. for vec::all([1, 2, 3]) {|elt| if elt == 2 { break; } log(error, elt); } Issue #1619
2012-03-26Bulk-edit mutable -> mut.Graydon Hoare-314/+314
2012-03-26rustc: Begin eliminating ext's dependency on the sessionBrian Anderson-46/+61
2012-03-26rustc: Move eval_const_expr to its own modBrian Anderson-178/+180
2012-03-26rustc: Combine and unify regionsPatrick Walton-37/+88
2012-03-26rustc: "unkown" -> "unknown"Patrick Walton-1/+1
2012-03-26rustc: Fix typo in inferPatrick Walton-1/+1
2012-03-26rustc: Remove obsolete FIXME in inferPatrick Walton-3/+0
2012-03-26rustc: Generalize resolve_var to work with regions tooPatrick Walton-15/+12
2012-03-26In typeck, don't call ty::store_iface_methods on private methodsTim Chevalier-2/+2
This was resulting in a different error message depending on whether the private method you were trying to call was in the same crate or a different one.
2012-03-26Improve type inference to compute LUB/GLBNiko Matsakis-134/+729
2012-03-26Enforce privacy declarations for class fields and methodsTim Chevalier-58/+95
2012-03-26Check in a forgotten new fileMarijn Haverbeke-0/+54
2012-03-26Disallow ret inside of block functionsMarijn Haverbeke-142/+143
Also adds proper checking for cont/break being inside a loop. Closes #1854 Issue #1619
2012-03-26Fix bug in generation of non-generic resource dtorsMarijn Haverbeke-1/+1
Issue #1944
2012-03-25repair the build---also, make try/commit work over both ty/region varsNiko Matsakis-17/+34
2012-03-24rustc: Generalize several parts of infer in preparation for using them for ↵Patrick Walton-94/+97
region bounds as well
2012-03-24Avoid unifying vars when possible; handle bot (more) correctlyNiko Matsakis-24/+48
2012-03-24rustc: Stub some region resolution stuff in inferPatrick Walton-3/+103
2012-03-24rustc: Add some simple region checking (no region vars yet)Patrick Walton-57/+39
Amazingly, this causes no test cases to fail!
2012-03-24prune unused unification code; leave region code that still needs to be portedNiko Matsakis-642/+50
2012-03-23Allow methods to call other methods in the same classTim Chevalier-2/+15
2012-03-23add a few measly comments, remove some dead codeNiko Matsakis-16/+19
2012-03-23xfail-test regions testsNiko Matsakis-21/+3
2012-03-23Implement new inference algorithm.Niko Matsakis-93/+879
2012-03-23Fix breakageTim Chevalier-5/+3
2012-03-23Handle self correctly when translating classesTim Chevalier-104/+99
This change uses the same code for handling the "self" reference for classes as is already used for impls/ifaces. This allows removing the extra maybe_self_id argument (which was just for classes) to trans_closure that I added before. I also rewrote the translation for class ctors so that it doesn't generate new AST nodes (instead translating directly). Also changed visit so that it visits class ctors correctly with visit_fn, and changed typestate to not do return-checking when visiting a class ctor.
2012-03-23rustc: Remove `// */` sequence from trans/base.rs; it breaks vi syntax ↵Patrick Walton-1/+1
highlighting
2012-03-23rustc: Stub a table of borrowingsPatrick Walton-2/+10
2012-03-23rustc: Make region folding not descend into function typesPatrick Walton-7/+15
Since region parameters are always universally quantified at the function level, this would be incorrect.
2012-03-23rustc: Fix parsing of `ret &EXPR`Patrick Walton-0/+1
The parser didn't think that `&` could start an expression.
2012-03-23rustc: Redo region inference to be a bit less brokenPatrick Walton-329/+390
2012-03-23Keep an explicit map of things that have to be spilledMarijn Haverbeke-11/+29
This prevents us from spilling locals more than once. Closes #2040
2012-03-23Remove last vestiges of old-style intrinsicsMarijn Haverbeke-139/+33
Closes #2048
2012-03-23Remove more needless context threading in transMarijn Haverbeke-177/+125
2012-03-23Revert resolve kludge that was working around #2049Marijn Haverbeke-12/+7
2012-03-23Stop trying to link intrinsics.bcMarijn Haverbeke-64/+0
2012-03-23Interpret native mods with ABI rust-intrinsic as builtinsMarijn Haverbeke-4/+1
2012-03-23Revert removal of intrinsicsMarijn Haverbeke-32/+200
Oops. We can't do this yet until the next snapshot.
2012-03-23Clean up some confused shuffling of def_ids in resolve.rsMarijn Haverbeke-34/+31