summary refs log tree commit diff
path: root/src/test/run-pass
AgeCommit message (Collapse)AuthorLines
2016-03-16truncate i8-s to i1-s when loading constantsAriel Ben-Yehuda-0/+19
Fixes #30891
2016-02-29std: Stabilize APIs for the 1.8 releaseAlex Crichton-12/+134
This commit is the result of the FCPs ending for the 1.8 release cycle for both the libs and the lang suteams. The full list of changes are: Stabilized * `braced_empty_structs` * `augmented_assignments` * `str::encode_utf16` - renamed from `utf16_units` * `str::EncodeUtf16` - renamed from `Utf16Units` * `Ref::map` * `RefMut::map` * `ptr::drop_in_place` * `time::Instant` * `time::SystemTime` * `{Instant,SystemTime}::now` * `{Instant,SystemTime}::duration_since` - renamed from `duration_from_earlier` * `{Instant,SystemTime}::elapsed` * Various `Add`/`Sub` impls for `Time` and `SystemTime` * `SystemTimeError` * `SystemTimeError::duration` * Various impls for `SystemTimeError` * `UNIX_EPOCH` * `ops::{Add,Sub,Mul,Div,Rem,BitAnd,BitOr,BitXor,Shl,Shr}Assign` Deprecated * Scoped TLS (the `scoped_thread_local!` macro) * `Ref::filter_map` * `RefMut::filter_map` * `RwLockReadGuard::map` * `RwLockWriteGuard::map` * `Condvar::wait_timeout_with` Closes #27714 Closes #27715 Closes #27746 Closes #27748 Closes #27908 Closes #29866
2016-02-26Rollup merge of #31904 - bluss:writer-formatter-error, r=alexcrichtonManish Goregaokar-0/+54
Make sure formatter errors are emitted by the default Write::write_fmt Previously, if an error was returned from the formatter that did not originate in an underlying writer error, Write::write_fmt would return successfully even if the formatting did not complete (was interrupted by an `fmt::Error` return). Now we choose to emit an io::Error with kind Other for formatter errors. Since this may reveal error returns from `write!()` and similar that previously passed silently, it's a kind of a [breaking-change]. Fixes #31879
2016-02-26Make sure formatter errors are emitted by the default Write::write_fmtUlrik Sverdrup-0/+54
Previously, if an error was returned from the formatter that did not originate in an underlying writer error, Write::write_fmt would return successfully even if the formatting did not complete (was interrupted by an `fmt::Error` return). Now we choose to emit an io::Error with kind Other for formatter errors. Since this may reveal error returns from `write!()` and similar that previously passed silently, it's a kind of a [breaking-change].
2016-02-26Auto merge of #31749 - nikomatsakis:compiletest-subdir, r=alexcrichtonbors-0/+0
You can now group tests into directories like `run-pass/borrowck` or `compile-fail/borrowck`. By default, all `.rs` files within any directory are considered tests: to ignore some directory, create a placeholder file called `compiletest-ignore-dir` (I had to do this for several existing directories). r? @alexcrichton cc @brson
2016-02-25Auto merge of #30856 - mneumann:thread_local_extern, r=alexcrichtonbors-0/+26
This will correctly add the thread_local attribute to the external static variable ```errno```: ```rust extern { #[thread_local] static errno: c_int; } ``` Before this commit, the thread_local attribute is ignored. Fixes #30795. Thanks @alexcrichton for pointing out the solution.
2016-02-25Rollup merge of #31362 - jseyfried:fix_extern_crate_visibility, r=nikomatsakisManish Goregaokar-0/+3
This PR changes the visibility of extern crate declarations to match that of items (fixes #26775). To avoid breakage, the PR makes it a `public_in_private` lint to reexport a private extern crate, and it adds the lint `inaccessible_extern_crate` for uses of an inaccessible extern crate. The lints can be avoided by making the appropriate `extern crate` declaration public.
2016-02-24Move the borrowck run-pass/compile-fail tests into their own directoriesNiko Matsakis-0/+0
as a test.
2016-02-24Add compiletest-ignore-dir to existing subdirectories.Niko Matsakis-0/+0
2016-02-24Fix the visibility of extern crate declarations and stop warning on pub ↵Jeffrey Seyfried-0/+3
extern crate
2016-02-23Auto merge of #31822 - petrochenkov:derive, r=alexcrichtonbors-0/+45
Fixes https://github.com/rust-lang/rust/issues/29548
2016-02-22Auto merge of #30969 - Amanieu:extended_atomic_cmpxchg, r=alexcrichtonbors-0/+68
This is an implementation of rust-lang/rfcs#1443.
2016-02-22Add a test to make sure trans doesn't choke on any of the intrinsicsAmanieu d'Antras-0/+37
2016-02-22Fix #[derive] for empty structs with bracesVadim Petrochenkov-0/+45
2016-02-22Ignore test case on Windows.Michael Neumann-0/+1
Windows is not #[cfg(target_thread_local)] and as such should link to the external symbol. But it fails with: thread '<main>' panicked at 'assertion failed: `(left == right)` (left: `272246271`, right: `3`)', C:/bot/slave/auto-win-msvc-64-opt/build/src/test/run-pass/thread-local-extern-static.rs:24
2016-02-21Run thread-local-extern-static test only on supported platforms.Michael Neumann-1/+2
2016-02-20Auto merge of #31757 - petrochenkov:unitdotdot, r=nikomatsakisbors-0/+2
This warning was introduced on Nov 28, 2015 and got into 1.6 stable, it was later requalified from a hardwired warning to a warn-by-default lint. If this patch is landed soon enough, then `match_of_unit_variant_via_paren_dotdot` will get into 1.8 stable as a deny-by-default lint. My intention is to turn it into a hard error after March 3, 2016, then it will hit stable at 1.9. r? @nikomatsakis cc @pnkfelix
2016-02-20Fix test case. Needs no_mangle and aux-buildMichael Neumann-0/+2
2016-02-20Auto merge of #31474 - arielb1:mir-typeck, r=nikomatsakisbors-5/+300
This should stop broken MIR from annoying us when we try to implement things
2016-02-20address review commentsAriel Ben-Yehuda-1/+5
2016-02-20Auto merge of #31771 - alexcrichton:oops-that-didnt-fix-anything, r=brsonbors-0/+5
In #31717 we rebased our LLVM fork over the 3.8 release branch, and it was thought that this fixed #31702. The testing, however, must have been erroneous, as it unfortunately didn't fix the issue! Our MUSL nightly builders are failing from the same assertion reported in the issue, so we at least know the test case is a reproduction! I believe the failure is only happening on the MUSL nightly builders because none of the auto builders have LLVM assertions enabled, and the Linux nightly builder *does* have assertions enabled for the binaries we generate but the distcheck run doesn't test a compiler with LLVM assertions enabled.
2016-02-20fix a few remaining bugs - make check runs!Ariel Ben-Yehuda-0/+183
2016-02-20store the normalized types of field accessesAriel Ben-Yehuda-0/+41
Fixes #31504
2016-02-20deref the argument of overloaded MIR autoderefAriel Ben-Yehuda-0/+41
Fixes #31466
2016-02-20tuple arguments to overloaded callsAriel Ben-Yehuda-5/+31
also fix translation of "rust-call" functions, although that could use more optimizations
2016-02-19Add license and feature(thread_local)Michael Neumann-0/+12
2016-02-18Ignore the test added in #31717Alex Crichton-0/+5
In #31717 we rebased our LLVM fork over the 3.8 release branch, and it was thought that this fixed #31702. The testing, however, must have been erroneous, as it unfortunately didn't fix the issue! Our MUSL nightly builders are failing from the same assertion reported in the issue, so we at least know the test case is a reproduction! I believe the failure is only happening on the MUSL nightly builders because none of the auto builders have LLVM assertions enabled, and the Linux nightly builder *does* have assertions enabled for the binaries we generate but the distcheck run doesn't test a compiler with LLVM assertions enabled.
2016-02-18Auto merge of #31684 - tmiasko:alternate-stack, r=alexcrichtonbors-0/+44
Remove alternate stack with sigaltstack before unmaping it. Also reuse existing signal stack if already set, this is especially useful when working with sanitizers that configure alternate stack themselves. This change depends on SS_DISABLE recently introduced in libc crate and updates this git submodule accordingly.
2016-02-18Make future-compat lint `match_of_unit_variant_via_paren_dotdot` deny by defaultVadim Petrochenkov-0/+2
2016-02-18Add intrinsics for compare_exchange and compare_exchange_weakAmanieu d'Antras-0/+31
2016-02-18Remove alternate stack with sigaltstack before unmapping it.Tomasz Miąsko-0/+44
Also reuse existing signal stack if already set, this is especially useful when working with sanitizers that configure alternate stack themselves.
2016-02-18Add more tests for unnameable reachable itemsVadim Petrochenkov-6/+53
2016-02-18privacy: Mark reachable but unnameable items as reachableVadim Petrochenkov-0/+19
2016-02-17Auto merge of #31717 - alexcrichton:llvmup2, r=brsonbors-0/+19
This commit rebases our LLVM submodule on the most recent tip of the `release_38` branch of LLVM. There's been a few fixes and this notably fixes the assertion error in #31702. Closes #31702
2016-02-16rustc: Rebase LLVM on the 3.8 release branchAlex Crichton-0/+19
This commit rebases our LLVM submodule on the most recent tip of the `release_38` branch of LLVM. There's been a few fixes and this notably fixes the assertion error in #31702.
2016-02-16Auto merge of #31680 - arielb1:fast-fulfill, r=nikomatsakisbors-0/+35
this improves typeck performance by 5% (LLVM times are still huge). Basically fixes #25916 (still O(n^2), but the example takes <1s to compile). r? @nikomatsakis
2016-02-16Auto merge of #30714 - wesleywiser:fix_29914, r=arielb1bors-0/+47
The issue was that the const evaluator was returning an error because the feature flag const_indexing wasn't turned on. The error was then reported as a bug. Fixes #29914
2016-02-15use stalled_on in all obligation typesAriel Ben-Yehuda-0/+35
this improves typeck performance by 5% (LLVM times are still huge). Basically fixes #25916 (still O(n^2), but the example takes <1s to compile).
2016-02-14Do not expect blocks to have type str.Eduard Burtescu-0/+7
2016-02-13Fix ICE on using result of index on a constant to index into a constantWesley Wiser-0/+47
The issue was that the const evaluator was returning an error because the feature flag const_indexing wasn't turned on. The error was then reported as a bug. Fixes #29914
2016-02-13Auto merge of #31570 - tomaka:ignore-emscripten, r=brsonbors-2/+129
Ignores 82 rpass tests that use threads. I took care to only ignore tests that call `thread::spawn`. Some tests, for example `issue-16597`, also do fail because of lack of threads support, but for other reasons. With this PR, we're down to 49 failures. r? @brson
2016-02-12Auto merge of #31541 - tomaka:more-emscripten, r=brsonbors-2/+10
r? @brson
2016-02-11Auto merge of #31545 - dotdash:no_noalias, r=alexcrichtonbors-0/+25
LLVM's memory dependence analysis doesn't properly account for calls that could unwind and thus effectively act as a branching point. This can lead to stores that are only visible when the call unwinds being removed, possibly leading to calls to drop() functions with b0rked memory contents. As there is no fix for this in LLVM yet and we want to keep compatibility to current LLVM versions anyways, we have to workaround this bug by omitting the noalias attribute on &mut function arguments. Benchmarks suggest that the performance loss by this change is very small. Thanks to @RalfJung for pushing me towards not removing too many noalias annotations and @alexcrichton for helping out with the test for this bug. Fixes #29485
2016-02-11Auto merge of #31532 - tomaka:fix-emscripten, r=brsonbors-1/+2
Before this PR: > test result: FAILED. 2039 passed; 327 failed; 2 ignored; 0 measured After: > test result: FAILED. 2232 passed; 134 failed; 2 ignored; 0 measured r? @brson
2016-02-11Auto merge of #31527 - danlrobertson:i15735, r=alexcrichtonbors-0/+25
After some digging I couldn't find a test for #15735, so I added a simplified version to `run-pass` and tested it against 80a3f45 to ensure it fails.
2016-02-11Ignore tests that use threads on emscriptenPierre Krieger-2/+129
2016-02-10Auto merge of #31409 - alexcrichton:command-exec, r=aturonbors-0/+162
These commits are an implementation of https://github.com/rust-lang/rfcs/pull/1359 which is tracked via https://github.com/rust-lang/rust/issues/31398. The `before_exec` implementation fit easily with the current process spawning framework we have, but unfortunately the `exec` implementation required a bit of a larger refactoring. The stdio handles were all largely managed as implementation details of `std::process` and the `exec` function lived in `std::sys`, so the two didn't have access to one another. I took this as a sign that a deeper refactoring was necessary, and I personally feel that the end result is cleaner for both Windows and Unix. The commits should be separated nicely for reviewing (or all at once if you're feeling ambitious), but the changes made here were: * The process spawning on Unix was refactored in to a pre-exec and post-exec function. The post-exec function isn't allowed to do any allocations of any form, and management of transmitting errors back to the parent is managed by the pre-exec function (as it's the one that actually forks). * Some management of the exit status was pushed into platform-specific modules. On Unix we must cache the return value of `wait` as the pid is consumed after we wait on it, but on Windows we can just keep querying the system because the handle stays valid. * The `Stdio::None` variant was renamed to `Stdio::Null` to better reflect what it's doing. * The global lock on `CreateProcess` is now correctly positioned to avoid unintended inheritance of pipe handles that other threads are sending to their child processes. After a more careful reading of the article referenced the race is not in `CreateProcess` itself, but rather the property that handles are unintentionally shared. * All stdio management now happens in platform-specific modules. This provides a cleaner implementation/interpretation for `FromFraw{Fd,Handle}` for each platform as well as a cleaner transition from a configuration to what-to-do once we actually need to do the spawn. With these refactorings in place, implementing `before_exec` and `exec` ended up both being pretty trivial! (each in their own commit)
2016-02-10Workaround LLVM optimizer bug by not marking &mut pointers as noaliasBjörn Steinbrink-0/+25
LLVM's memory dependence analysis doesn't properly account for calls that could unwind and thus effectively act as a branching point. This can lead to stores that are only visible when the call unwinds being removed, possibly leading to calls to drop() functions with b0rked memory contents. As there is no fix for this in LLVM yet and we want to keep compatibility to current LLVM versions anyways, we have to workaround this bug by omitting the noalias attribute on &mut function arguments. Benchmarks suggest that the performance loss by this change is very small. Thanks to @RalfJung for pushing me towards not removing too many noalias annotations and @alexcrichton for helping out with the test for this bug. Fixes #29485
2016-02-10More emscripten test fixesPierre Krieger-2/+10
2016-02-10std: Implement CommandExt::execAlex Crichton-0/+72
This commit implements the `exec` function proposed in [RFC 1359][rfc] which is a function on the `CommandExt` trait to execute all parts of a `Command::spawn` without the `fork` on Unix. More details on the function itself can be found in the comments in the commit. [rfc]: https://github.com/rust-lang/rfcs/pull/1359 cc #31398