about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2013-11-18auto merge of #10555 : TeXitoi/rust/pidigits-resurected, r=alexcrichtonbors-137/+66
Changes: * default value when no args * license * removed libc printing * use extra::bigint instead of handmade gmp binding The drawback is that it's 2 order of magnitude slower, the good news is that there is a good bench for extra::bigint.
2013-11-18pidigits resurectedGuillaume Pinot-137/+66
Changes: * default value when no args * license * removed libc printing * use extra::bigint instead of handmade gmp binding
2013-11-18auto merge of #10539 : alexcrichton/rust/external-linkage, r=pcwaltonbors-79/+147
If a function is marked as external, then it's likely desired for use with some native library, so we're not really accomplishing a whole lot by internalizing all of these symbols.
2013-11-18Don't mark reachable extern fns as internalAlex Crichton-79/+147
If a function is marked as external, then it's likely desired for use with some native library, so we're not really accomplishing a whole lot by internalizing all of these symbols.
2013-11-17auto merge of #10443 : alexcrichton/rust/meaninless-pub-priv, r=cmrbors-8/+110
Closes #10111
2013-11-17Forbid privacy in inner functionsAlex Crichton-8/+110
Closes #10111
2013-11-17auto merge of #10526 : itdaniher/rust/master, r=pcwaltonbors-7/+10
This commit fixes issue #10468. It propagate optimization level from PkgSrc to compile_crate as a rustc::driver::session::OptLevel enum. The 'opt' argument to compile_crate was previously hardcoded as boolean false, such that calls to session::options would always result in the session::No flag being used.
2013-11-17auto merge of #10363 : astrieanna/rust/fix-x86stdcall, r=huonwbors-8/+9
* moved `extern` inside module * changed `extern "stdcall"` to `extern "system"` * changed `cfg(target_os="win32")` to `cfg(windows)` * only run on Windows && x86, (not x86_64) * updated copyright dates
2013-11-17Fix XFailed test x86stdcallLeah Hanson-8/+9
There was a syntax error because the `extern "stdcall"` was outside the module instead of inside it. * moved `extern` inside module * change `extern "stdcall"` to `extern "system"` * change `cfg(target_os="win32")` to `cfg(windows)` * updated copyright dates * changed log(error, ...) => info!(....) * added `pub` keyword to kernel32 functions
2013-11-17Fixed docs for advance() in Iterator traitAndrei Formiga-6/+3
2013-11-17Fixed uses of get() to unwrap() in doc examples in std::iterAndrei Formiga-28/+28
2013-11-17auto merge of #10511 : cmr/rust/addtests, r=huonwbors-3/+50
Commit messages have all
2013-11-17Better error message when using vectors in staticsCorey Richardson-3/+26
Closes #10487
2013-11-17Add a test for #6976Corey Richardson-0/+24
Closes #6976
2013-11-17auto merge of #10532 : dhodder/rust/master, r=alexcrichtonbors-0/+10
Hello. This is just a tiny doc update -- I'm new here, so apologies if I'm doing it wrong.
2013-11-17auto merge of #10531 : TeXitoi/rust/mandelbrot-resurected, r=cmrbors-48/+63
Changes: * add licence; * remove usage of libc and unsafe; * use BufferedWriter to improve performance; * use a DummyWriter to cancel binary output in test.
2013-11-17Add doc comment for extra::url::query_to_strDave Hodder-0/+10
2013-11-17auto merge of #10523 : huonw/rust/10522, r=cmrbors-1/+6
If any of the digits was one past the maximum (e.g. 10**9 for base 10), then this wasn't detected correctly and so the length of the digit was one more than expected, causing a very large allocation. Fixes #10522. Fixes #10288.
2013-11-17auto merge of #10518 : huonw/rust/6911, r=alexcrichtonbors-14/+21
Bringing it into line with the unused-variable one, fn main() { let mut _a = 1; } will not warn that `_a` is never used mutably. Fixes #6911.
2013-11-17Prettier long string breaking.Guillaume Pinot-2/+2
2013-11-17Clarrify the message for test mode and use u8 instead of i8 for storing bitsGuillaume Pinot-4/+5
2013-11-17auto merge of #10509 : cmr/rust/trait_name, r=alexcrichtonbors-6/+8
Rebase + fix of #10118
2013-11-17resurect shootout-mandelbrot.rsGuillaume Pinot-48/+62
Changes: * add licence; * remove usage of libc and unsafe; * use BufferedWriter to improve performance; * use a DummyWriter to cancel binary output in test.
2013-11-17auto merge of #10466 : alexcrichton/rust/issue-10334, r=cmrbors-102/+157
These commits create a `Buffer` trait in the `io` module which represents an I/O reader which is internally buffered. This abstraction is used to reasonably implement `read_line` and `read_until` along with at least an ok implementation of `read_char` (although I certainly haven't benchmarked `read_char`).
2013-11-16auto merge of #10454 : z0w0/rust/issue-9944, r=cmrbors-2/+12
Allows you to provide explicit `--cfg` flags when building certain packages through the rustpkg API.
2013-11-17extra: handle an edge case in BigUint.to_str().Huon Wilson-1/+6
If any of the digits was one past the maximum (e.g. 10**9 for base 10), then this wasn't detected correctly and so the length of the digit was one more than expected, causing a very large allocation. Fixes #10522. Fixes #10288.
2013-11-16fix 10468, propagate optimization level as rustc::driver::session::OptLevelIan Daniher-7/+10
2013-11-16auto merge of #10420 : sanxiyn/rust/path, r=cmrbors-5/+16
Fix #10283.
2013-11-16lint: _-prefixed variables don't get an unused-mut warning.Huon Wilson-14/+21
Bringing it into line with the unused-variable one, fn main() { let mut _a = 1; } will not warn that `_a` is never used mutably. Fixes #6911.
2013-11-16Implement read_char on the Buffer traitAlex Crichton-0/+43
2013-11-16Adjust error message for method type mismatchCorey Richardson-2/+2
Closes #10118, Closes #5925
2013-11-16Show the name of the trait in the error messageJaemin Moon-6/+8
2013-11-14auto merge of #10478 : TeXitoi/rust/shootout-meteor, r=brsonbors-0/+281
This implementation of the meteor contest implements: - insertion check with bit trick; - pregenetation of every feasible placement of the pieces on the board; - filtering of placement that implies unfeasible board - central symetry breaking related to #2776
2013-11-14remove `cast::unsafe_copy`Daniel Micay-8/+0
This is the same functionality as `ptr::read_ptr`.
2013-11-14Improve variable naming.Guillaume Pinot-7/+8
2013-11-14remove useless Iterate impl, and permute the order of the argument of iterateGuillaume Pinot-9/+4
Writing iterate(x, f) is more logical as rust iterator pipeline is left to right.
2013-11-14auto merge of #10018 : fhahn/rust/check-inferred-ints, r=alexcrichtonbors-18/+123
I've started working on this issue and pushed a small commit, which adds a range check for integer literals in `middle::const_eval` (no `uint` at the moment) At the moment, this patch is just a proof of concept, I'm not sure if there is a better function for the checks in `middle::const_eval`. This patch does not check for overflows after constant folding, eg: let x: i8 = 99 + 99;
2013-11-14auto merge of #10428 : toffaletti/rust/try_lock, r=alexcrichtonbors-1/+49
I need try_lock for an algorithm I'm trying to implement in Rust.
2013-11-14auto merge of #9788 : geoffhill/rust/bare-fn-cast, r=pnkfelixbors-2/+38
Bare functions are another example of a scalar but non-numeric type (like char) that should be handled separately in casts. This disallows expressions like `0 as extern "Rust" fn() -> int;`. It might be advantageous to allow casts between bare functions and raw pointers in unsafe code in the future, to pass function pointers between Rust and C. Closes #8728
2013-11-14Add shootout meteor contest benchmark.Guillaume Pinot-0/+285
This implementation of the meteor contest implements: - insertion check with bit trick; - pregenetation of every feasible placement of the pieces on the board; - filtering of placement that implies unfeasible board - central symetry breaking
2013-11-14test: Add xfail-win32 to two debug-info testsklutzy-0/+2
2013-11-14rustpkg: Disable test suite on windowsklutzy-1/+1
sha1, version, util tests are still alive and they pass on win32.
2013-11-14test: Fix signal-exit-status on windowsklutzy-2/+5
2013-11-14test: Clean up xfail-{fast,win32} testsklutzy-56/+26
Rename {struct-update,fsu}-moves-and-copies, since win32 failed to run the test since UAC prevents any executable whose name contaning "update". (#10452) Some tests related to #9205 are expected to fail on gcc 4.8, so they are marked as `xfail-win32` instead of `xfail-fast`. Some tests using `extra::tempfile` fail on win32 due to #10462. Mark them as `xfail-win32`.
2013-11-13auto merge of #10457 : alexcrichton/rust/native-io, r=brsonbors-356/+476
This commit re-organizes the io::native module slightly in order to have a working implementation of rtio::IoFactory which uses native implementations. The goal is to seamlessly multiplex among libuv/native implementations wherever necessary. Right now most of the native I/O is unimplemented, but we have existing bindings for file descriptors and processes which have been hooked up. What this means is that you can now invoke println!() from libstd with no local task, no local scheduler, and even without libuv. There's still plenty of work to do on the native I/O factory, but this is the first steps into making it an official portion of the standard library. I don't expect anyone to reach into io::native directly, but rather only std::io primitives will be used. Each std::io interface seamlessly falls back onto the native I/O implementation if the local scheduler doesn't have a libuv one (hurray trait ojects!)
2013-11-13Implement native::IoFactoryAlex Crichton-356/+476
This commit re-organizes the io::native module slightly in order to have a working implementation of rtio::IoFactory which uses native implementations. The goal is to seamlessly multiplex among libuv/native implementations wherever necessary. Right now most of the native I/O is unimplemented, but we have existing bindings for file descriptors and processes which have been hooked up. What this means is that you can now invoke println!() from libstd with no local task, no local scheduler, and even without libuv. There's still plenty of work to do on the native I/O factory, but this is the first steps into making it an official portion of the standard library. I don't expect anyone to reach into io::native directly, but rather only std::io primitives will be used. Each std::io interface seamlessly falls back onto the native I/O implementation if the local scheduler doesn't have a libuv one (hurray trait ojects!)
2013-11-13auto merge of #10464 : gutworth/rust/snap-err, r=pnkfelixbors-2/+5
...tatement
2013-11-13add rust_trylock_little_lockJason Toffaletti-1/+49
Try to acquire lock and succeed only if lock is not already held. Uses TryEnterCriticalSection or pthread_mutex_trylock.
2013-11-13auto merge of #10421 : adridu59/rust/patch-www, r=alexcrichtonbors-1/+8
* Closes #10330 * Improves on #9873 * Adds favicon for tutorial files
2013-11-13auto merge of #10447 : alexcrichton/rust/flaky-time-test, r=catamorphismbors-6/+5
This test was failing periodically on windows and other platforms, and in debugging the issue locally I've found that the previous test was failing at the assertion `ns0 <= ns1`. Upon inspecting the values, the two numbers were very close to one another, but off by a little bit. I believe that this is because `precise_time_s` goes from `u64` -> `f64` and then we go again back to `u64` for the assertion. This conversion is a lossy one that's not always guaranteed to succeed, so instead I've changed the test to only compare against u64 instances.