summary refs log tree commit diff
path: root/src/compiletest
AgeCommit message (Collapse)AuthorLines
2014-03-31vec: convert `append` and `append_one` to methodsDaniel Micay-11/+5
These were only free functions on `~[T]` because taking self by-value used to be broken.
2014-03-28Convert most code to new inner attribute syntax.Brian Anderson-4/+4
Closes #2569
2014-03-26auto merge of #13117 : alexcrichton/rust/no-crate-map, r=brsonbors-1/+3
This can be done now that logging has been moved out and libnative is the default (not libgreen)
2014-03-24auto merge of #12900 : alexcrichton/rust/rewrite-sync, r=brsonbors-1/+0
* Remove clone-ability from all primitives. All shared state will now come from the usage of the primitives being shared, not the primitives being inherently shareable. This allows for fewer allocations for stack-allocated primitives. * Add `Mutex<T>` and `RWLock<T>` which are stack-allocated primitives for purely wrapping a piece of data * Remove `RWArc<T>` in favor of `Arc<RWLock<T>>` * Remove `MutexArc<T>` in favor of `Arc<Mutex<T>>` * Shuffle around where things are located * The `arc` module now only contains `Arc` * A new `lock` module contains `Mutex`, `RWLock`, and `Barrier` * A new `raw` module contains the primitive implementations of `Semaphore`, `Mutex`, and `RWLock` * The Deref/DerefMut trait was implemented where appropriate * `CowArc` was removed, the functionality is now part of `Arc` and is tagged with `#[experimental]`. * The crate now has #[deny(missing_doc)] * `Arc` now supports weak pointers This is not a large-scale rewrite of the functionality contained within the `sync` crate, but rather a shuffling of who does what an a thinner hierarchy of ownership to allow for better composability.
2014-03-24green: Remove the dependence on the crate mapAlex Crichton-1/+3
This is the final nail in the coffin for the crate map. The `start` function for libgreen now has a new added parameter which is the event loop factory instead of inferring it from the crate map. The two current valid values for this parameter are `green::basic::event_loop` and `rustuv::event_loop`.
2014-03-23Snapshot cleanupAlex Crichton-1/+0
2014-03-23auto merge of #13102 : huonw/rust/totaleq-deriving, r=thestingerbors-1/+1
std: remove the `equals` method from `TotalEq`. `TotalEq` is now just an assertion about the `Eq` impl of a type (i.e. `==` is a total equality if a type implements `TotalEq`) so the extra method is just confusing. Also, a new method magically appeared as a hack to allow deriving to assert that the contents of a struct/enum are also TotalEq, because the deriving infrastructure makes it very hard to do anything but create a trait method. (You didn't hear about this horrible work-around from me :(.)
2014-03-23std: remove the `equals` method from `TotalEq`.Huon Wilson-1/+1
`TotalEq` is now just an assertion about the `Eq` impl of a type (i.e. `==` is a total equality if a type implements `TotalEq`) so the extra method is just confusing. Also, a new method magically appeared as a hack to allow deriving to assert that the contents of a struct/enum are also TotalEq, because the deriving infrastructure makes it very hard to do anything but create a trait method. (You didn't hear about this horrible work-around from me :(.)
2014-03-23iter: remove `to_owned_vec`Daniel Micay-1/+1
This needs to be removed as part of removing `~[T]`. Partial type hints are now allowed, and will remove the need to add a version of this method for `Vec<T>`. For now, this involves a few workarounds for partial type hints not completely working.
2014-03-21rustc: Switch defaults from libgreen to libnativeAlex Crichton-0/+5
The compiler will no longer inject libgreen as the default runtime for rust programs, this commit switches it over to libnative by default. Now that libnative has baked for some time, it is ready enough to start getting more serious usage as the default runtime for rustc generated binaries. We've found that there isn't really a correct decision in choosing a 1:1 or M:N runtime as a default for all applications, but it seems that a larger number of programs today would work more reasonable with a native default rather than a green default. With this commit come a number of bugfixes: * The main native task is now named "<main>" * The main native task has the stack bounds set up properly * #[no_uv] was renamed to #[no_start] * The core-run-destroy test was rewritten for both libnative and libgreen and one of the tests was modified to be more robust. * The process-detach test was locked to libgreen because it uses signal handling
2014-03-22Remove outdated and unnecessary std::vec_ng::Vec imports.Huon Wilson-6/+1
(And fix some tests.)
2014-03-21test: Make manual changes to deal with the fallout from removal ofPatrick Walton-119/+151
`~[T]` in test, libgetopts, compiletest, librustdoc, and libnum.
2014-03-20syntax: Tidy up parsing the new attribute syntaxAlex Crichton-0/+1
2014-03-20Removing imports of std::vec_ng::VecAlex Crichton-1/+0
It's now in the prelude.
2014-03-20rename std::vec -> std::sliceDaniel Micay-2/+2
Closes #12702
2014-03-15log: Introduce liblog, the old std::loggingAlex Crichton-0/+3
This commit moves all logging out of the standard library into an external crate. This crate is the new crate which is responsible for all logging macros and logging implementation. A few reasons for this change are: * The crate map has always been a bit of a code smell among rust programs. It has difficulty being loaded on almost all platforms, and it's used almost exclusively for logging and only logging. Removing the crate map is one of the end goals of this movement. * The compiler has a fair bit of special support for logging. It has the __log_level() expression as well as generating a global word per module specifying the log level. This is unfairly favoring the built-in logging system, and is much better done purely in libraries instead of the compiler itself. * Initialization of logging is much easier to do if there is no reliance on a magical crate map being available to set module log levels. * If the logging library can be written outside of the standard library, there's no reason that it shouldn't be. It's likely that we're not going to build the highest quality logging library of all time, so third-party libraries should be able to provide just as high-quality logging systems as the default one provided in the rust distribution. With a migration such as this, the change does not come for free. There are some subtle changes in the behavior of liblog vs the previous logging macros: * The core change of this migration is that there is no longer a physical log-level per module. This concept is still emulated (it is quite useful), but there is now only a global log level, not a local one. This global log level is a reflection of the maximum of all log levels specified. The previously generated logging code looked like: if specified_level <= __module_log_level() { println!(...) } The newly generated code looks like: if specified_level <= ::log::LOG_LEVEL { if ::log::module_enabled(module_path!()) { println!(...) } } Notably, the first layer of checking is still intended to be "super fast" in that it's just a load of a global word and a compare. The second layer of checking is executed to determine if the current module does indeed have logging turned on. This means that if any module has a debug log level turned on, all modules with debug log levels get a little bit slower (they all do more expensive dynamic checks to determine if they're turned on or not). Semantically, this migration brings no change in this respect, but runtime-wise, this will have a perf impact on some code. * A `RUST_LOG=::help` directive will no longer print out a list of all modules that can be logged. This is because the crate map will no longer specify the log levels of all modules, so the list of modules is not known. Additionally, warnings can no longer be provided if a malformed logging directive was supplied. The new "hello world" for logging looks like: #[phase(syntax, link)] extern crate log; fn main() { debug!("Hello, world!"); }
2014-03-14lint: add lint for use of a `~[T]`.Huon Wilson-0/+1
This is useless at the moment (since pretty much every crate uses `~[]`), but should help avoid regressions once completely removed from a crate.
2014-03-12auto merge of #12414 : DaGenix/rust/failing-iterator-wrappers, r=alexcrichtonbors-1/+2
Most IO related functions return an IoResult so that the caller can handle failure in whatever way is appropriate. However, the `lines`, `bytes`, and `chars` iterators all supress errors. This means that code that needs to handle errors can't use any of these iterators. All three of these iterators were updated to produce IoResults. Fixes #12368
2014-03-12Update io iterators to produce IoResultsPalmer Cox-1/+2
Most IO related functions return an IoResult so that the caller can handle failure in whatever way is appropriate. However, the `lines`, `bytes`, and `chars` iterators all supress errors. This means that code that needs to handle errors can't use any of these iterators. All three of these iterators were updated to produce IoResults. Fixes #12368
2014-03-12rustc: Remove matching on ~str from the languageMichael Darakananda-15/+15
The `~str` type is not long for this world as it will be superseded by the soon-to-come DST changes for the language. The new type will be `~Str`, and matching over the allocation will no longer be supported. Matching on `&str` will continue to work, in both a pre and post DST world.
2014-03-04Rename all variables that have uppercase characters in their names to use ↵Palmer Cox-80/+80
only lowercase characters
2014-02-25auto merge of #12530 : alexcrichton/rust/make-check-no-rpath, r=brsonbors-2/+20
This involves passing through LD_LIBRARY_PATH through more places, specifically in the compiletest, run-make, and doctest runners.
2014-02-23Roll std::run into std::io::processAlex Crichton-13/+16
The std::run module is a relic from a standard library long since past, and there's not much use to having two modules to execute processes with where one is slightly more convenient. This commit merges the two modules, moving lots of functionality from std::run into std::io::process and then deleting std::run. New things you can find in std::io::process are: * Process::new() now only takes prog/args * Process::configure() takes a ProcessConfig * Process::status() is the same as run::process_status * Process::output() is the same as run::process_output * I/O for spawned tasks is now defaulted to captured in pipes instead of ignored * Process::kill() was added (plus an associated green/native implementation) * Process::wait_with_output() is the same as the old finish_with_output() * destroy() is now signal_exit() * force_destroy() is now signal_kill() Closes #2625 Closes #10016
2014-02-21mk: Get "make check" passing with --disable-rpathAlex Crichton-2/+20
This involves passing through LD_LIBRARY_PATH through more places, specifically in the compiletest, run-make, and doctest runners.
2014-02-20auto merge of #12399 : michaelwoerister/rust/simd-fix, r=alexcrichtonbors-8/+19
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-2/+22
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-20move extra::test to libtestLiigo Zhuang-5/+2
2014-02-19Tweak how preference factors into linkageAlex Crichton-2/+22
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: Fix a RUSTFLAGS incompatibility in test runner.Michael Woerister-8/+19
2014-02-16Allow configuration of uid/gid/detach on processesAlex Crichton-8/+2
This just copies the libuv implementation for libnative which seems reasonable enough (uid/gid fail on windows). Closes #12082
2014-02-14extern mod => extern crateAlex Crichton-2/+2
This was previously implemented, and it just needed a snapshot to go through
2014-02-14extra: Capture stdout/stderr of tests by defaultAlex Crichton-1/+18
When tests fail, their stdout and stderr is printed as part of the summary, but this helps suppress failure messages from #[should_fail] tests and generally clean up the output of the test runner.
2014-02-14auto merge of #12192 : luqmana/rust/fix-cross, r=alexcrichtonbors-10/+20
Fix some fall out from the big command line option changes.
2014-02-13compiletest: Run all android tests seriallyBrian Anderson-3/+5
This is an attempt to isolate test failures on the bots. It may also eliminate problems with the emulators breaking by reducing the chance of OOM.
2014-02-13mk: Fix non-android cross builds.Luqman Aden-10/+20
2014-02-11Add ignore-cross-compile directive for compiletestAlex Crichton-0/+2
Loadable syntax extensions don't work when cross compiling (see #12102), so the fourcc tests all need to be ignored. They're valuable tests, so they shouldn't be outright ignored, so they're now flagged with ignore-cross-compile
2014-02-11Change `xfail` directives in compiletests to `ignore`, closes #11363Florian Hahn-9/+9
2014-02-10Consolidate codegen-related compiler flagsAlex Crichton-3/+3
Move them all behind a new -C switch. This migrates some -Z flags and some top-level flags behind this -C codegen option. The -C flag takes values of the form "-C name=value" where the "=value" is optional for some flags. Flags affected: * --llvm-args => -C llvm-args * --passes => -C passes * --ar => -C ar * --linker => -C linker * --link-args => -C link-args * --target-cpu => -C target-cpu * --target-feature => -C target-fature * --android-cross-path => -C android-cross-path * --save-temps => -C save-temps * --no-rpath => -C no-rpath * -Z no-prepopulate => -C no-prepopulate-passes * -Z no-vectorize-loops => -C no-vectorize-loops * -Z no-vectorize-slp => -C no-vectorize-slp * -Z soft-float => -C soft-float * -Z gen-crate-map => -C gen-crate-map * -Z prefer-dynamic => -C prefer-dynamic * -Z no-integrated-as => -C no-integrated-as As a bonus, this also promotes the -Z extra-debug-info flag to a first class -g or --debuginfo flag. * -Z debug-info => removed * -Z extra-debug-info => -g or --debuginfo Closes #9770 Closes #12000
2014-02-07Rewrite path::Display to reduce unnecessary allocationKevin Ballard-3/+1
2014-02-06auto merge of #12020 : alexcrichton/rust/output-flags, r=brsonbors-8/+21
This commit removes the -c, --emit-llvm, -s, --rlib, --dylib, --staticlib, --lib, and --bin flags from rustc, adding the following flags: * --emit=[asm,ir,bc,obj,link] * --crate-type=[dylib,rlib,staticlib,bin,lib] The -o option has also been redefined to be used for *all* flavors of outputs. This means that we no longer ignore it for libraries. The --out-dir remains the same as before. The new logic for files that rustc emits is as follows: 1. Output types are dictated by the --emit flag. The default value is --emit=link, and this option can be passed multiple times and have all options stacked on one another. 2. Crate types are dictated by the --crate-type flag and the #[crate_type] attribute. The flags can be passed many times and stack with the crate attribute. 3. If the -o flag is specified, and only one output type is specified, the output will be emitted at this location. If more than one output type is specified, then the filename of -o is ignored, and all output goes in the directory that -o specifies. The -o option always ignores the --out-dir option. 4. If the --out-dir flag is specified, all output goes in this directory. 5. If -o and --out-dir are both not present, all output goes in the directory of the crate file. 6. When multiple output types are specified, the filestem of all output is the same as the name of the CrateId (derived from a crate attribute or from the filestem of the crate file). Closes #7791 Closes #11056 Closes #11667
2014-02-06Redesign output flags for rustcAlex Crichton-8/+21
This commit removes the -c, --emit-llvm, -s, --rlib, --dylib, --staticlib, --lib, and --bin flags from rustc, adding the following flags: * --emit=[asm,ir,bc,obj,link] * --crate-type=[dylib,rlib,staticlib,bin,lib] The -o option has also been redefined to be used for *all* flavors of outputs. This means that we no longer ignore it for libraries. The --out-dir remains the same as before. The new logic for files that rustc emits is as follows: 1. Output types are dictated by the --emit flag. The default value is --emit=link, and this option can be passed multiple times and have all options stacked on one another. 2. Crate types are dictated by the --crate-type flag and the #[crate_type] attribute. The flags can be passed many times and stack with the crate attribute. 3. If the -o flag is specified, and only one output type is specified, the output will be emitted at this location. If more than one output type is specified, then the filename of -o is ignored, and all output goes in the directory that -o specifies. The -o option always ignores the --out-dir option. 4. If the --out-dir flag is specified, all output goes in this directory. 5. If -o and --out-dir are both not present, all output goes in the current directory of the process. 6. When multiple output types are specified, the filestem of all output is the same as the name of the CrateId (derived from a crate attribute or from the filestem of the crate file). Closes #7791 Closes #11056 Closes #11667
2014-02-06getopts: replaced base functions with those from groupArcterus-5/+5
2014-02-06Move getopts out of extraArcterus-2/+2
2014-02-03compiletest: Remove io_error usageAlex Crichton-17/+25
2014-01-29Remove do keyword from compiletestsScott Lawrence-2/+2
2014-01-28Generate rlibs by default (instead of dylibs)Alex Crichton-1/+1
Closes #11253
2014-01-21[std::str] Rename from_utf8_owned_opt() to from_utf8_owned(), drop the old ↵Simon Sapin-5/+5
from_utf8_owned() behavior
2014-01-21[std::str] Rename from_utf8_opt() to from_utf8(), drop the old from_utf8() ↵Simon Sapin-1/+1
behavior
2014-01-21[std::vec] Rename .shift_opt() to .shift(), drop the old .shift() behaviorSimon Sapin-1/+1
2014-01-21[std::vec] Rename .pop_opt() to .pop(), drop the old .pop() behaviorSimon Sapin-4/+4