summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2014-01-08auto merge of #11401 : michaelwoerister/rust/issue11322, r=alexcrichtonbors-0/+40
`expand_include_str()` in libsyntax seems to have corrupted the CodeMap by always setting the BytePos of any included files to zero. It now uses `CodeMap::new_filemap()` which should set everything properly. This should fix issue #11322 but I don't want to close it before I have confirmation from the reporters that the problem is indeed fixed.
2014-01-08auto merge of #11370 : alexcrichton/rust/issue-10465, r=pwaltonbors-0/+33
Turned out to be a 2-line fix, but the compiler fallout was huge.
2014-01-08Fix CodeMap issue in expand_include_str()Michael Woerister-0/+40
2014-01-08auto merge of #11405 : huonw/rust/moredocs, r=huonwbors-18/+18
Various documentation changes, change the 'borrowed pointer' terminology to 'reference', fix a problem with 'make dist' on windows.
2014-01-08auto merge of #11358 : pcwalton/rust/typed-arenas, r=alexcrichtonbors-11/+12
A typed arena is a type of arena that can only allocate objects of one type. It is 3x faster than the existing arena and 13x faster than malloc on Mac. r? @brson
2014-01-07Fix leaking trait imports across modulesAlex Crichton-0/+33
Turns out the pass in resolve was a little too eager to travel back up the hierarchy chain when looking for trait candidates. Closes #10465
2014-01-07'borrowed pointer' -> 'reference'Brian Anderson-18/+18
2014-01-07libextra: Introduce typed arenas.Patrick Walton-11/+12
A typed arena is a type of arena that can only allocate objects of one type. It is 3x faster than the existing arena and 13x faster than malloc on Mac.
2014-01-07auto merge of #11353 : alexcrichton/rust/improve-logging, r=brsonbors-0/+46
This will allow capturing of common things like logging messages, stdout prints (using stdio println), and failure messages (printed to stderr). Any new prints added to libstd should be funneled through these task handles to allow capture as well. Additionally, this commit redirects logging back through a `Logger` trait so the log level can be usefully consumed by an arbitrary logger. This commit also introduces methods to set the task-local stdout handles: * std::io::stdio::set_stdout * std::io::stdio::set_stderr * std::io::logging::set_logger These methods all return the previous logger just in case it needs to be used for inspection. I plan on using this infrastructure for extra::test soon, but we don't quite have the primitives that I'd like to use for it, so it doesn't migrate extra::test at this time. Closes #6369
2014-01-07auto merge of #11347 : alexcrichton/rust/issue-11346, r=brsonbors-0/+5
This ends up causing weird errors like those seen in #11346 Closes #11346
2014-01-07auto merge of #11329 : fhahn/rust/unused-cast-lint2, r=alexcrichtonbors-0/+24
Updates as mentioned in #11135
2014-01-06Support arbitrary stdout/stderr/logger handlesAlex Crichton-0/+46
This will allow capturing of common things like logging messages, stdout prints (using stdio println), and failure messages (printed to stderr). Any new prints added to libstd should be funneled through these task handles to allow capture as well. Additionally, this commit redirects logging back through a `Logger` trait so the log level can be usefully consumed by an arbitrary logger. This commit also introduces methods to set the task-local stdout handles: * std::io::stdio::set_stdout * std::io::stdio::set_stderr * std::io::logging::set_logger These methods all return the previous logger just in case it needs to be used for inspection. I plan on using this infrastructure for extra::test soon, but we don't quite have the primitives that I'd like to use for it, so it doesn't migrate extra::test at this time. Closes #6369
2014-01-06Add lint for unnecessary castsFlorian Hahn-0/+24
2014-01-06Don't attempt duplicate outputsAlex Crichton-0/+5
This ends up causing weird errors like those seen in #11346 Closes #11346
2014-01-06auto merge of #11333 : cmr/rust/triage2, r=alexcrichtonbors-2/+29
2014-01-06auto merge of #11315 : alexcrichton/rust/issue-11309, r=huonwbors-0/+28
There was a scheduling race where a child may not increment the global task count before the parent exits, and the parent would then think that there are no more tasks left. Closes #11039
2014-01-05Guarantee that native tasks wait for childrenAlex Crichton-0/+28
There was a scheduling race where a child may not increment the global task count before the parent exits, and the parent would then think that there are no more tasks left.
2014-01-05Fix some warningsCorey Richardson-1/+1
2014-01-05Remove a fixmeCorey Richardson-1/+28
pcwalton says this is right, and it looks right to me too. Closes #4731
2014-01-06Revert "std: adjust requested stack size for thread-local storage."Huon Wilson-22/+0
This reverts commit f1b5f59287106fc511d29c425255bd343608065c. Using a private function of a library is a bad idea: several people (on Linux) were meeting with linking errors because of it (different/older versions of glibc).
2014-01-05Don't abort the process in native::startAlex Crichton-0/+22
If the main closure failed, then the `exit_code` variable would still be `None`, and the `unwrap()` was failing (triggering a process abort). This changes the `unwrap()` to an `unwrap_or()` in order to prevent process abort and detect when the native task failed.
2014-01-04auto merge of #11188 : brson/rust/noderef, r=brsonbors-336/+145
This removes the feature where newtype structs can be dereferenced like pointers, and likewise where certain enums can be dereferenced (which I imagine nobody realized still existed). This ad-hoc behavior is to be replaced by a more general overloadable dereference trait in the future. I've been nursing this patch for two months and think it's about rebased up to master. @nikomatsakis this makes a bunch of your type checking code noticeably uglier.
2014-01-04rustc: Add error about obsolete struct derefBrian Anderson-0/+15
2014-01-04Don't allow newtype structs to be dereferenced. #6246Brian Anderson-322/+138
2014-01-04auto merge of #11284 : huonw/rust/issue-6233, r=alexcrichtonbors-0/+22
If there is a lot of data in thread-local storage some implementations of pthreads (e.g. glibc) fail if you don't request a stack large enough -- by adjusting for the minimum size we guarantee that our stacks are always large enough. Issue #6233.
2014-01-04Don't allow single-variant enums to be dereferenced. #6246Brian Anderson-25/+3
I'm not sure if this was even intentional at this point.
2014-01-03auto merge of #11251 : pcwalton/rust/remove-at-mut, r=pcwaltonbors-1356/+427
r? @nikomatsakis for the borrow checker changes. Write guards are now eliminated.
2014-01-04std: adjust requested stack size for thread-local storage.Huon Wilson-0/+22
If there is a lot of data in thread-local storage some implementations of pthreads (e.g. glibc) fail if you don't request a stack large enough -- by adjusting for the minimum size we guarantee that our stacks are always large enough. Issue #6233.
2014-01-03test: Make all the run-pass tests use `pub fn main`Patrick Walton-73/+73
2014-01-03test: De-`@mut` the test suitePatrick Walton-837/+351
2014-01-03test: Get rid of some `@mut`s in borrow check testsPatrick Walton-45/+3
2014-01-03test: Make `borrowck-assign-to-subfield` into a run-pass test, now thatPatrick Walton-11/+0
it no longer has boxes in it
2014-01-03test: Remove all borrow check write guard testsPatrick Walton-390/+0
2014-01-03auto merge of #11264 : am0d/rust/crate_type_lint, r=alexcrichtonbors-0/+12
This ensures that the `crate_type` attribute always contains a value, and does not contain an invalid value. Fixes #11256.
2014-01-03auto merge of #11149 : alexcrichton/rust/remove-either, r=brsonbors-5/+12
Had to change some stuff in typeck to bootstrap (getting methods in fmt off of Either), but other than that not so painful. Closes #9157
2014-01-03Remove std::eitherAlex Crichton-5/+12
2014-01-03auto merge of #11276 : brson/rust/0.9, r=pcwaltonbors-1/+1
2014-01-03auto merge of #11262 : alexcrichton/rust/issue-11259, r=pcwaltonbors-0/+8
Closes #11259
2014-01-02auto merge of #11093 : alexcrichton/rust/issue-11085, r=pcwaltonbors-0/+55
Closes #11085
2014-01-02Bump version to 0.9Brian Anderson-1/+1
2014-01-02auto merge of #10696 : fhahn/rust/issue9543-remove-extern-mod-foo, r=pcwaltonbors-3/+2
This patch for #9543 throws an `obsolete syntax` error for `extern mod foo (name="bar")` . I was wondering if [this](https://github.com/fhahn/rust/compare/mozilla:master...fhahn:issue9543-remove-extern-mod-foo?expand=1#diff-da9d34ca1d0f6beee2838cf02e07345cR4444) is the correct place to do this? I think the wording of the error message could probably be improved as well. If this approach is OK, I'm going to run the whole test suite tomorrow and update the old syntax to the new one.
2014-01-02auto merge of #11274 : michaelwoerister/rust/issue11083, r=pcwaltonbors-0/+33
This pull request fixes #11083. The problem was that recursive type definitions were not properly handled for enum types, leading to problems with LLVM's metadata "uniquing". This bug has already been fixed for struct types some time ago (#9658) but I seem to have forgotten about enums back then. I added the offending code from issue #11083 as a test case.
2014-01-02debuginfo: Add test case for recursive enum types (issue #11083)Michael Woerister-0/+33
2014-01-01auto merge of #11246 : ktt3ja/rust/issue-11224, r=alexcrichtonbors-0/+16
Close #11224
2014-01-01auto merge of #11245 : alexcrichton/rust/issue-11225, r=pcwaltonbors-0/+134
Commit messages are a little more descriptive.
2014-01-02Test column offset for #11184Jan Niklas Hasse-0/+1
2014-01-01Add linting for `crate_type` attribute values.a_m0d-0/+12
This ensures that the `crate_type` attribute always contains a value, and does not contain an invalid value.
2014-01-01Remove `extern mod foo (name="bar")` syntax, closes #9543Florian Hahn-3/+2
2014-01-01Fix usage of rustc --ls on invalid filesAlex Crichton-0/+8
Closes #11259
2014-01-01Don't leave lingering files in doc testsAlex Crichton-0/+1
Closes #11234