about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2011-06-15Implement checking against assignments to immutable obj fieldsMarijn Haverbeke-4/+2
2011-06-15Extend alias analysis to check assignmentsMarijn Haverbeke-9/+3
This is a somewhat odd place to put these checks, but the data tracked by that pass, and the available functions, make it trivial to do such a check there.
2011-06-15Fix assignments to immutable fields throughout the codeMarijn Haverbeke-11/+11
2011-06-14Add new testcase to show the nature of our exciting block-expr / trailing ↵Graydon Hoare-0/+51
unop interaction.
2011-06-14Remove some unnecessary xfailsTim Chevalier-45/+8
2011-06-14Un-xfail test/run-fail/pred.rsTim Chevalier-6/+3
2011-06-14Un-xfail working test casesTim Chevalier-6/+2
2011-06-14Un-xfail some tests that workTim Chevalier-9/+2
2011-06-14Add xfail-stage0 to some tests (not sure if it matters...)Tim Chevalier-0/+5
2011-06-14Implement function expressions/anonymous functionsMarijn Haverbeke-0/+4
Looks like 'fn(..arg..) -> ret {body;}. They don't support type parameters or upvars yet.
2011-06-13This is the mega-ucontext commit. It replaces the task switching mechanism ↵Eric Holk-21/+41
with a new one inspired by ucontext. It works under Linux, OS X and Windows, and is Valgrind clean on Linux and OS X (provided the runtime is built with gcc). This commit also moves yield and join to the standard library, as requested in #42. Join is currently a no-op though.
2011-06-13rustc: Assignment expressions have nil type. Closes #483Brian Anderson-0/+30
2011-06-10Un-XFAIL pred-on-wrong-slotsTim Chevalier-3/+1
2011-06-11test: Add tests for issue #452Brian Anderson-0/+35
2011-06-10Implement meta tag matching in creader. Start using it in rustc.rc. Close ↵Graydon Hoare-4/+4
#459. Close #457.
2011-06-10Friendlier error message for break outside a loopTim Chevalier-0/+7
The typechecker should really check for this, but at least now there's an error message rather than an inexhaustive match failure in trans.
2011-06-10Use RHS type when translating assignmentsTim Chevalier-0/+9
In code like "auto foo = fail", a type gets inferred for foo depending on how it's used. However, fail still has type _|_ and still should be treated that way: particularly, its value shouldn't be copied. Fixed trans to reflect that.
2011-06-10test: Change bitwise.rs to use ! instead of ~. Should put out burning tinderbox.Patrick Walton-1/+1
2011-06-10Merge pull request #447 from paulstansifer/quick_error_message_fixPatrick Walton-0/+4
Error message, instead of segfault, when recursive types are used.
2011-06-10Handle mutable references in alias analysisMarijn Haverbeke-0/+12
2011-06-10Fix unsafe uses of mutable referencesMarijn Haverbeke-2/+2
2011-06-10Implement mutable/immutable alias distinction.Marijn Haverbeke-0/+10
Before, all aliases were implicitly mutable, and writing &mutable was the same as writing &. Now, the two are distinguished, and assignments to regular aliases are no longer allowed.
2011-06-09Improve error message for wrong number of type argumentsTim Chevalier-0/+13
Improve error message in the case where a use of a polymorphic tag has insufficient type arguments given. Before, the typechecker was just crashing with a bounds check error.
2011-06-09A revised, improved alias-checkerMarijn Haverbeke-4/+24
The old system tried to ensure that the location an alias pointed at would retain its type. That turned out to not be strong enough in the face of aliases to the inside of tags. The new system instead proves that values pointed to by aliases are not replaced (or invalidated in some other way) at all. It knows of two sufficient conditions for this, and tries to prove at least of them: A) The alias is 'immutably rooted' in a local, and this local is not reassigned for the lifetime of the alias. Immutably rooted means the alias refers to the local itself, or to something reachable from the local through immutable dereferencing. B) No value whose type might include the type of the 'inner mutable element' of the thing the alias refers to (for example, the box in rec(mutable x = @mutable int)) is from the outer scope is accessed for the lifetime of the alias. This means for functions, no other argument types may include the alias's inner mutable type. For alt, for each, and for, it means the body does not refer to any locals originating from outside their scope that include this type. The lifetime of an alias in an alt, for each, or for body is defined as the range from its definition to its last use, not to the point where it goes out of scope. This makes working around these restrictions somewhat less annoying. For example, you can assign to your alt-ed value you don't refer to any bindings afterwards.
2011-06-09Add new visitor frameworkMarijn Haverbeke-0/+9
2011-06-08rustc: Fix error pattern in compile-fail/arg-count-mismatch.rsPatrick Walton-1/+1
2011-06-08test: Add a test case for issue #362, "ret none".Patrick Walton-0/+6
2011-06-08Add optional message to fail.Josh Matthews-0/+5
2011-06-07rustc: Print out a real error message on unresolved types. Puts out burning ↵Patrick Walton-1/+1
tinderbox.
2011-06-07rustc: Use a set-based approach to unification; remove ty_bound_param and ↵Patrick Walton-2/+1
ty_local. Sorry, big perf regression; will fix soon.
2011-06-07Add multiline, whitespace-eating strings.Josh Matthews-0/+15
2011-06-06Implement enough support for pointer to get an identity function working.Rafael Ávila de Espíndola-1/+7
2011-06-06First take on an alias-safety checkerMarijn Haverbeke-0/+26
The alias checker works by ensuring that any value to which an alias is created is rooted in some way that ensures it outlives the alias. It is now disallowed to create an alias to the content of a mutable box, or to a box hanging off a mutable field. There is also machinery in place to prevent assignment to local variables whenever they are the root of a live alias.
2011-06-04stdlib: Use spans for #fmt errors originating in stdBrian Anderson-0/+15
Issue #444
2011-06-04rustc: Use spans for #env errorsBrian Anderson-0/+15
Issue #444
2011-06-04rustc: Use spans on extfmt error messagesBrian Anderson-0/+37
Issue #444
2011-06-03"macro" -> "syntax extension" for nowPaul Stansifer-1/+1
2011-06-03Make the macro system more modular.Paul Stansifer-0/+5
2011-06-03Accept *foo as a pointer to foo.Rafael Ávila de Espíndola-0/+6
This is accepted everywhere, since just passing a pointer is safe.
2011-06-03Temporarily xfail compile-fail/pattern-tyvarMarijn Haverbeke-0/+3
So that the tinderboxes can go green again. Patrick, please look into this at some point.
2011-06-02Un-XFAIL break-valueTim Chevalier-4/+1
It passes thanks to the previous two commits.
2011-06-02Implement pcwalton's code review suggestions.Paul Stansifer-1/+1
2011-06-02Error message, instead of segfault, when recursive types are used.Paul Stansifer-0/+4
2011-06-02Re-xfail lib-io test. Seems to only work on LinuxMarijn Haverbeke-0/+3
2011-06-02Fix and un-xfail vec-append testMarijn Haverbeke-4/+1
2011-06-02Un-xfail multi testMarijn Haverbeke-4/+1
2011-06-02Un-xfail lib-io testMarijn Haverbeke-4/+1
2011-06-02Un-xfail obj-dtor-2Marijn Haverbeke-4/+0
2011-06-01Use span_err instead of err. Fixes issue #444.Lindsey Kuper-0/+14
2011-05-31Now imports are not re-exported unless 'export' is explicitly used.Paul Stansifer-0/+36