about summary refs log tree commit diff
path: root/src/test/run-pass
AgeCommit message (Collapse)AuthorLines
2017-05-11do not fetch variance for items when equatingNiko Matsakis-0/+43
Fixes #41849. Problem was that evaluating the constant expression required evaluating a trait, which would equate types, which would request variance information, which it would then discard. However, computing the variance information would require determining the type of a field, which would evaluate the constant expression. (This problem will potentially arise *later* as we move to more sophisticated constants, however, where we need to check subtyping. We can tackle that when we come to it.)
2017-05-10Skip print-stdout-eprint-stderr test on emscriptenZack Weinberg-0/+2
2017-05-10Fix up stability annotations per feedback.Zack Weinberg-2/+0
2017-05-10Add `eprint!` and `eprintln!` macros to the prelude.Zack Weinberg-0/+40
These are exactly the same as `print!` and `println!` except that they write to stderr instead of stdout. Issue #39228.
2017-05-09Auto merge of #41777 - nikomatsakis:issue-41697-mir-dump-cycle, r=arielb1bors-0/+50
dump-mir was causing cycles by invoking item-path-str at bad times Workaround for now, but probably a better fix is to opt **in** to using the types for impls (if we do that at all; maybe filename/line is better). Fixes #41697
2017-05-08Rollup merge of #41838 - z1mvader:fix_fn_args_coerce_closure, r=nikomatsakisCorey Farwell-0/+17
Fixed argument inference for closures when coercing into 'fn' This fixes https://github.com/rust-lang/rust/issues/41755. The tests `compile-fail/closure-no-fn.rs` and `compile-fail/issue-40000.rs` were modified. A new test `run-pass/closure_to_fn_coercion-expected-types.rs` was added r? @nikomatsakis
2017-05-08Rollup merge of #41827 - qnighy:allow-bare-cr-in-nondoc-comment, r=estebankCorey Farwell-0/+18
Allow bare CR in ////-style comment. Fixes #40624 in a way that bare CR is allowed in all non-doc comments.
2017-05-08massive refactorChristian Poveda-1/+0
2017-05-08added testChristian Poveda-0/+18
2017-05-08dump-mir was causing cycles by invoking item-path-str at bad timesNiko Matsakis-0/+50
Workaround for now, but probably a better fix is to opt **in** to using the types for impls (if we do that at all; maybe filename/line is better).
2017-05-08Allow bare CR in ////-style comment.Masaki Hara-0/+18
2017-05-06rustc: treat const bodies like fn bodies in middle::region.Eduard-Mihai Burtescu-0/+9
2017-05-03Add test for an inference failure.Charlie Sheridan-0/+21
2017-04-30refactor the handling of lvalue opsAriel Ben-Yehuda-0/+20
Fixes #41604.
2017-04-29Don't ever warn about #[used] items being dead code.Eduard-Mihai Burtescu-0/+17
2017-04-28Auto merge of #41542 - petrochenkov:objpars2, r=nikomatsakisbors-0/+22
syntax: Parse trait object types starting with a lifetime bound Fixes https://github.com/rust-lang/rust/issues/39085 This was originally implemented in https://github.com/rust-lang/rust/pull/40043, then reverted, then there was some [agreement](https://github.com/rust-lang/rust/issues/39318#issuecomment-289108720) that it should be supported. (This is hopefully the last PR related to bound parsing.)
2017-04-27travis: Parallelize tests on AndroidAlex Crichton-1/+12
Currently our slowest test suite on android, run-pass, takes over 5 times longer than the x86_64 component (~400 -> ~2200s). Typically QEMU emulation does indeed add overhead, but not 5x for this kind of workload. One of the slowest parts of the Android process is that *compilation* happens serially. Tests themselves need to run single-threaded on the emulator (due to how the test harness works) and this forces the compiles themselves to be single threaded. Now Travis gives us more than one core per machine, so it'd be much better if we could take advantage of them! The emulator itself is still fundamentally single-threaded, but we should see a nice speedup by sending binaries for it to run much more quickly. It turns out that we've already got all the tools to do this in-tree. The qemu-test-{server,client} that are in use for the ARM Linux testing are a perfect match for the Android emulator. This commit migrates the custom adb management code in compiletest/rustbuild to the same qemu-test-{server,client} implementation that ARM Linux uses. This allows us to lift the parallelism restriction on the compiletest test suites, namely run-pass. Consequently although we'll still basically run the tests themselves in single threaded mode we'll be able to compile all of them in parallel, keeping the pipeline much more full and using more cores for the work at hand. Additionally the architecture here should be a bit speedier as it should have less overhead than adb which is a whole new process on both the host and the emulator! Locally on an 8 core machine I've seen the run-pass test suite speed up from taking nearly an hour to only taking 6 minutes. I don't think we'll see quite a drastic speedup on Travis but I'm hoping this change can place the Android tests well below 2 hours instead of just above 2 hours. Because the client/server here are now repurposed for more than just QEMU, they've been renamed to `remote-test-{server,client}`. Note that this PR does not currently modify how debuginfo tests are executed on Android. While parallelizable it wouldn't be quite as easy, so that's left to another day. Thankfully that test suite is much smaller than the run-pass test suite. As a final fix I discovered that the ARM and Android test suites were actually running all library unit tests (e.g. stdtest, coretest, etc) twice. I've corrected that to only run tests once which should also give a nice boost in overall cycle time here.
2017-04-28Auto merge of #41591 - frewsxcv:rollup, r=frewsxcvbors-0/+26
Rollup of 7 pull requests - Successful merges: #41438, #41523, #41526, #41546, #41556, #41572, #41578 - Failed merges:
2017-04-27Auto merge of #41529 - bitshifter:issue-41479, r=eddybbors-0/+18
Add missing OperandPair struct field index adjustments. Fixes #41479. This is a bug fix for a regression in https://github.com/rust-lang/rust/commit/6d841da4a0d7629f826117f99052e3d4a7997a7e.
2017-04-27typeck: resolve type vars before calling `try_index_step`Ariel Ben-Yehuda-0/+26
`try_index_step` does not resolve type variables by itself and would fail otherwise. Also harden the failure path in `confirm` to cause less confusing errors.
2017-04-27Auto merge of #37860 - giannicic:defaultimpl, r=nagisabors-0/+835
#37653 support `default impl` for specialization this commit implements the first step of the `default impl` feature: > all items in a `default impl` are (implicitly) `default` and hence > specializable. In order to test this feature I've copied all the tests provided for the `default` method implementation (in run-pass/specialization and compile-fail/specialization directories) and moved the `default` keyword from the item to the impl. See [referenced](https://github.com/rust-lang/rust/issues/37653) issue for further info r? @aturon
2017-04-26 support `default impl` for specializationGianni Ciccarelli-11/+11
`[default] [unsafe] impl` and typecheck
2017-04-25Add a regression test for ICE #33287Wesley Wiser-0/+18
Fixes #33287
2017-04-25Parse trait object types starting with a lifetime boundVadim Petrochenkov-0/+22
2017-04-25Added test for #41479 from @eddyb.Cameron Hart-0/+18
2017-04-25 support `default impl` for specializationGianni Ciccarelli-0/+106
pr review
2017-04-24Auto merge of #40123 - TimNN:llvm40, r=alexcrichtonbors-2/+23
LLVM 4.0 Upgrade Since nobody has done this yet, I decided to get things started: **Todo:** * [x] push the relevant commits to `rust-lang/llvm` and `rust-lang/compiler-rt` * [x] cleanup `.gitmodules` * [x] Verify if there are any other commits from `rust-lang/llvm` which need backporting * [x] Investigate / fix debuginfo ("`<optimized out>`") failures * [x] Use correct emscripten version in docker image --- Closes #37609. --- **Test results:** Everything is green 🎉
2017-04-24support `default impl` for specializationGianni Ciccarelli-0/+729
this commit implements the first step of the `default impl` feature: all items in a `default impl` are (implicitly) `default` and hence specializable. In order to test this feature I've copied all the tests provided for the `default` method implementation (in run-pass/specialization and compile-fail/specialization directories) and moved the `default` keyword from the item to the impl. See referenced issue for further info
2017-04-24Fix more merge conflictsMatthew-37/+125
2017-04-23FIN: ignore failing test on emscripten, see #41299Tim Neumann-0/+2
2017-04-23FIN: disable backtrace printing for panic-runtime/abort* on ARMTim Neumann-2/+21
2017-04-23rustc_const_eval: support all unit enum variants.Eduard-Mihai Burtescu-0/+98
2017-04-23Auto merge of #41437 - cuviper:remove-unstable-deprecated, r=alexcrichtonbors-37/+27
Remove items that are unstable and deprecated This removes unstable items that have been deprecated for more than one cycle. - Since 1.16.0, `#![feature(enumset)]` - All of `mod collections::enum_set` - Since 1.15.0, `#![feature(borrow_state)]` - `cell::BorrowState` - `RefCell::borrow_state()` - Since 1.15.0, `#![feature(is_unique)]` - `Rc::is_unique()` (made private like `Arc::is_unique()`) - Since 1.15.0, `#![feature(rc_would_unwrap)]` - `Rc::would_wrap()` - Since 1.13.0, `#![feature(binary_heap_extras)]` - `BinaryHeap::push_pop()` - `BinaryHeap::replace()` - Since 1.12.0, `#![feature(as_unsafe_cell)]` - `Cell::as_unsafe_cell()` - `RefCell::as_unsafe_cell()` - Since 1.12.0, `#![feature(map_entry_recover_keys)]` - `btree_map::OccupiedEntry::remove_pair()` - `hash_map::OccupiedEntry::remove_pair()` - Since 1.11.0, `#![feature(float_extras)]` - `Float::nan()` - `Float::infinity()` - `Float::neg_infinity()` - `Float::neg_zero()` - `Float::zero()` - `Float::one()` - `Float::integer_decode()` - `f32::integer_decode()` - `f32::ldexp()` - `f32::frexp()` - `f32::next_after()` - `f64::integer_decode()` - `f64::ldexp()` - `f64::frexp()` - `f64::next_after()` - Since 1.11.0, `#![feature(zero_one)]` - `num::Zero` - `num::One`
2017-04-22Resolve merge conflictmatthewjasper-0/+196
2017-04-20Remove float_extrasJosh Stone-5/+3
[unstable, deprecated since 1.11.0]
2017-04-20Remove num::{Zero,One}Josh Stone-12/+23
[unstable, deprecated since 1.11.0]
2017-04-20Remove BinaryHeap::{push_pop,replace}Josh Stone-2/+0
[unstable, deprecated since 1.13.0]
2017-04-20Remove EnumSetJosh Stone-18/+1
[unstable, deprecated since 1.16.0]
2017-04-21Added feature gate, updated error messages and tests.Cameron Hart-0/+1
2017-04-21Implementation of repr struct alignment RFC 1358.Cameron Hart-0/+195
The main changes around rustc::ty::Layout::struct and rustc_trans:adt: * Added primitive_align field which stores alignment before repr align * Always emit field padding when generating the LLVM struct fields * Added methods for adjusting field indexes from the layout index to the LLVM struct field index The main user of this information is rustc_trans::adt::struct_llfields which determines the LLVM fields to be used by LLVM, including padding fields.
2017-04-20Stabilize RFC 1506 - clarified ADT kindsMatthew-2/+0
2017-04-19propagate obligations during overlap checkNiko Matsakis-0/+16
2017-04-19Auto merge of #41325 - eddyb:isolate-snapshots-for-good, r=arielb1bors-0/+4
Ban registering obligations during InferCtxt snapshots. Back in #33852, a flag was added to `InferCtxt` to prevent rolling back a snapshot if obligations were added to some `FulfillmentContext` during the snapshot, to prevent leaking fresh inference variables (created during that snapshot, so their indices would get reused) in obligations, which could ICE or worse. But that isn't enough in the long run, as type-checking ends up relying on success implying that eager side-effects are fine, and while stray obligations *do* get caught nowadays, those errors prevent, e.g. the speculative coercions from #37658, which *have to* be rolled back *even* if they succeed. We can't just allow those obligations to stay around though, because we end up, again, in ICEs or worse. Instead, this PR modifies `lookup_method_in_trait_adjusted` to return `InferOk` containing the obligations that `Autoderef::finalize_as_infer_ok` can propagate to deref coercions. As there shouldn't be *anything* left that registers obligations during snapshots, it's completely banned. r? @nikomatsakis @arielb1
2017-04-17Rollup merge of #41012 - durka:vis-matcher, r=petrochenkovCorey Farwell-0/+115
:vis matcher for macro_rules Resurrection of @DanielKeep's implementation posted with [RFC 1575](https://github.com/rust-lang/rfcs/pull/1575). @jseyfried was of the opinion that this doesn't need an RFC. Needed before merge: - [x] sign-off from @DanielKeep since I stole his code - [x] feature gate - [x] docs
2017-04-16Auto merge of #40409 - mbrubeck:calloc, r=sfacklerbors-0/+5
Specialize Vec::from_elem to use calloc Fixes #38723. This specializes the implementation for `u8` only, but it could be extended to other zeroable types if desired. I haven't tested this extensively, but I did verify that it gives the expected performance boost for large `vec![0; n]` allocations with both alloc_system and jemalloc, on Linux. (I have not tested or even built the Windows code.)
2017-04-16rustc_typeck: fix binops needing more type informations to coerce.Eduard-Mihai Burtescu-0/+4
2017-04-15reduce macro rule duplication in testAlex Burka-20/+4
2017-04-15feature gate :vis matcherAlex Burka-0/+1
2017-04-15parse interpolated visibility tokensAlex Burka-2/+14
2017-04-15update :vis implementation to current rustAlex Burka-10/+9