about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2014-02-21Test nested `proc` can access outer owned dataFlavio Percoco-0/+20
Fixes #10682
2014-02-21auto merge of #12326 : bjz/rust/integer, r=alexcrichtonbors-0/+1
This is part of the effort to simplify `std::num`, as tracked in issue #10387.
2014-02-21auto merge of #12419 : huonw/rust/compiler-unsafe, r=alexcrichtonbors-0/+17
Previously an `unsafe` block created by the compiler (like those in the formatting macros) would be "ignored" if surrounded by `unsafe`, that is, the internal unsafety would be being legitimised by the external block: unsafe { println!("...") } =(expansion)=> unsafe { ... unsafe { ... } } And the code in the inner block would be using the outer block, making it considered used (and the inner one considered unused). This patch forces the compiler to create a new unsafe context for compiler generated blocks, so that their internal unsafety doesn't escape to external blocks. Fixes #12418.
2014-02-22Move std::num::Integer to libnumBrendan Zabarauskas-0/+1
2014-02-21Changed NonCamelCaseTypes lint to warn by defaultmr.Shu-0/+3
Added allow(non_camel_case_types) to librustc where necesary Tried to fix problems with non_camel_case_types outside rustc fixed failing tests Docs updated Moved #[allow(non_camel_case_types)] a level higher. markdown.rs reverted Fixed timer that was failing tests Fixed another timer
2014-02-20Re-work loading crates with nicer errorsAlex Crichton-0/+73
This commit rewrites crate loading internally in attempt to look at less metadata and provide nicer errors. The loading is now split up into a few stages: 1. Collect a mapping of (hash => ~[Path]) for a set of candidate libraries for a given search. The hash is the hash in the filename and the Path is the location of the library in question. All candidates are filtered based on their prefix/suffix (dylib/rlib appropriate) and then the hash/version are split up and are compared (if necessary). This means that if you're looking for an exact hash of library you don't have to open up the metadata of all libraries named the same, but also in your path. 2. Once this mapping is constructed, each (hash, ~[Path]) pair is filtered down to just a Path. This is necessary because the same rlib could show up twice in the path in multiple locations. Right now the filenames are based on just the crate id, so this could be indicative of multiple version of a crate during one crate_id lifetime in the path. If multiple duplicate crates are found, an error is generated. 3. Now that we have a mapping of (hash => Path), we error on multiple versions saying that multiple versions were found. Only if there's one (hash => Path) pair do we actually return that Path and its metadata. With this restructuring, it restructures code so errors which were assertions previously are now first-class errors. Additionally, this should read much less metadata with lots of crates of the same name or same version in a path. Closes #11908
2014-02-20auto merge of #12405 : kud1ing/rust/backticks, r=huonwbors-6/+6
2014-02-20auto merge of #12403 : eddyb/rust/generic-dtors-with-bounds, r=nikomatsakisbors-8/+12
Fix generic Drop impls with trait bounds. Fixes #4252.
2014-02-20auto merge of #12399 : michaelwoerister/rust/simd-fix, r=alexcrichtonbors-1/+70
Fixes #12333. I also re-enabled the *function-arg-initialization* test case, so if it passes again, fixes #12021.
2014-02-20auto merge of #12398 : alexcrichton/rust/rlibs-and-dylibs-2, r=cmrbors-0/+85
The new methodology can be found in the re-worded comment, but the gist of it is that -C prefer-dynamic doesn't turn off static linkage. The error messages should also be a little more sane now. Closes #12133
2014-02-20rustc: avoid compiler generated `unsafe` blocks leaking.Huon Wilson-0/+17
Previously an `unsafe` block created by the compiler (like those in the formatting macros) would be "ignored" if surrounded by `unsafe`, that is, the internal unsafety would be being legitimised by the external block: unsafe { println!("...") } =(expansion)=> unsafe { ... unsafe { ... } } And the code in the inner block would be using the outer block, making it considered used (and the inner one considered unused). This patch forces the compiler to create a new unsafe context for compiler generated blocks, so that their internal unsafety doesn't escape to external blocks. Fixes #12418.
2014-02-19librustc: Remove unique vector patterns from the language.Patrick Walton-44/+54
Preparatory work for removing unique vectors from the language, which is itself preparatory work for dynamically sized types.
2014-02-20Resolve the vtables for method calls to generic Drop impls with trait bounds.Eduard Burtescu-8/+12
2014-02-19adjust to currently used stylekud1ing-6/+6
2014-02-19auto merge of #12379 : alexcrichton/rust/fix-ar-thing, r=brsonbors-0/+22
When creating a staticlib, it unzips all static archives it finds and then inserts the files manually into the output file. This process is done through `ar`, and `ar` doesn't like if you specify you want to add files and you don't give it any files. This case arose whenever you linked to an archive that didn't have any contents or all of the contents were filtered out. This just involved ignoring the case where the number of inputs we have is 0, because we don't have any files to add anyway.
2014-02-19auto merge of #12375 : FlaPer87/rust/issue-7660, r=cmrbors-0/+24
2014-02-19Tweak how preference factors into linkageAlex Crichton-0/+85
The new methodology can be found in the re-worded comment, but the gist of it is that -C prefer-dynamic doesn't turn off static linkage. The error messages should also be a little more sane now. Closes #12133
2014-02-19debuginfo: Re-enable test case that should have worked all along.Michael Woerister-1/+0
2014-02-19debuginfo: Move test case from run-pass to debug-info directory so it does ↵Michael Woerister-0/+0
not interfere with RUSTFLAGS=-g
2014-02-19debuginfo: Add support for simd typesMichael Woerister-0/+70
2014-02-19auto merge of #12349 : edwardw/rust/debug-expansion, r=huonwbors-0/+18
Currently, the format_args! macro and its downstream macros in turn expand to series of let statements, one for each of its arguments, and then the invocation of the macro function. If one or more of the arguments are RefCell's, the enclosing statement for the temporary of the let is the let itself, which leads to scope problem. This patch changes let's to a match expression. Closes #12239.
2014-02-19Change the format_args! macro expansion for temporariesEdward Wang-0/+18
Currently, the format_args! macro and its downstream macros in turn expand to series of let statements, one for each of its arguments, and then the invocation of the macro function. If one or more of the arguments are RefCell's, the enclosing statement for the temporary of the let is the let itself, which leads to scope problem. This patch changes let's to a match expression. Closes #12239.
2014-02-19auto merge of #12370 : rcxdude/rust/macro_fix, r=alexcrichtonbors-0/+19
Closes #11692. Instead of returning the original expression, a dummy expression (with identical span) is returned. This prevents infinite loops of failed expansions as well as odd double error messages in certain situations. This is a slightly better fix than #12197, because it does not produce a double error and also fixes a few other cases where an infinite loop could happen. This does not fix the other issue in #11692 (non-builtin macros not being recognised when expanded inside macros), which I think should be moved into a separate issue.
2014-02-19rustdoc: Fix json output and inputAlex Crichton-0/+29
Turns out a hash map with integer keys isn't serializable to json. Closes #10115
2014-02-18auto merge of #12245 : nick29581/rust/priv2, r=alexcrichtonbors-0/+281
closes #4110
2014-02-19Make priavcy checking aware that a `use` directive can point to two ↵Nick Cameron-0/+281
defintions (namespaces) with different privacy. Closes #4110
2014-02-18Fix staticlib outputs linking to blank archivesAlex Crichton-0/+22
When creating a staticlib, it unzips all static archives it finds and then inserts the files manually into the output file. This process is done through `ar`, and `ar` doesn't like if you specify you want to add files and you don't give it any files. This case arose whenever you linked to an archive that didn't have any contents or all of the contents were filtered out. This just involved ignoring the case where the number of inputs we have is 0, because we don't have any files to add anyway.
2014-02-18Regression test closes #7660Flavio Percoco-0/+24
2014-02-18auto merge of #12336 : kballard/rust/mutexarc-no-freeze, r=alexcrichtonbors-26/+0
With Rc no longer trying to statically prevent cycles (and thus no longer using the Freeze bound), it seems appropriate to remove that restriction from MutexArc as well. Closes #9251.
2014-02-18auto merge of #12330 : nick29581/rust/glue, r=huonwbors-0/+24
closes #3290
2014-02-18Avoid returning original macro if expansion fails.Douglas Young-0/+19
Closes #11692. Instead of returning the original expression, a dummy expression (with identical span) is returned. This prevents infinite loops of failed expansions as well as odd double error messages in certain situations.
2014-02-18auto merge of #12351 : kud1ing/rust/backticks, r=alexcrichtonbors-3/+3
2014-02-18Test ordering of glue_drop and glue_takew in self-re-assignment. Closes #3290.Nick Cameron-0/+24
2014-02-17auto merge of #12232 : kballard/rust/taskbuilder-is-a-builder, r=alexcrichtonbors-9/+3
Delete all the documentation from std::task that references linked failure. Tweak TaskBuilder to be more builder-like. `.name()` is now `.named()` and `.add_wrapper()` is now `.with_wrapper()`. Remove `.watched()` and `.unwatched()` as they didn't actually do anything. Closes #6399.
2014-02-17auto merge of #12146 : gentlefolk/rust/issue-2404, r=alexcrichtonbors-0/+45
Addresses FIXME described in issue #2404
2014-02-17Updated metadata::creader::resolve_crate_deps to use the correct span. ↵gentlefolk-0/+45
Clarified error message when an external crate's dependency is missing. Closes #2404.
2014-02-17backticks for syntax elementskud1ing-3/+3
2014-02-17Remove the compile-fail test that's now obsoleteKevin Ballard-26/+0
2014-02-17Forbid use of generics with foreign functions. Closes #10353.Nick Cameron-0/+15
2014-02-16Allow configuration of uid/gid/detach on processesAlex Crichton-1/+60
This just copies the libuv implementation for libnative which seems reasonable enough (uid/gid fail on windows). Closes #12082
2014-02-16Update clients of the TaskBuilder APIKevin Ballard-9/+3
2014-02-17Remove CloneableTuple and ImmutableTuple traitsBrendan Zabarauskas-2/+2
These are adequately covered by the Tuple2 trait.
2014-02-17Improve naming of tuple getters, and add mutable tuple getterBrendan Zabarauskas-1/+1
Renames the `n*` and `n*_ref` tuple getters to `val*` and `ref*` respectively, and adds `mut*` getters.
2014-02-15auto merge of #12301 : FlaPer87/rust/issue-8893, r=alexcrichtonbors-0/+19
2014-02-16Add test and close #8893Flavio Percoco-0/+19
2014-02-15auto merge of #12272 : alexcrichton/rust/snapshot, r=kballardbors-436/+426
This notably contains the `extern mod` => `extern crate` change. Closes #9880
2014-02-15auto merge of #12270 : bstrie/rust/pnoise, r=huonwbors-65/+49
Mostly just style fixes, but also remove a heap allocation and switch to using a buffered writer rather than doing 60,000 `println!`s.
2014-02-15Clean up the Perlin noise benchmarkBen Striegel-65/+49
2014-02-15std: clean up ptr a bitCorey Richardson-68/+21
2014-02-14extern mod => extern crateAlex Crichton-426/+426
This was previously implemented, and it just needed a snapshot to go through