summary refs log tree commit diff
path: root/src/test/run-pass
AgeCommit message (Collapse)AuthorLines
2015-10-23add main fn to testNiko Matsakis-0/+2
2015-10-23distinguish projections from the env/obj-types vs those fromNiko Matsakis-0/+31
trait definitions, and give prefence to the former. This is consistent with what we do for selection. It also works around a limitation that was leading to #28871.
2015-10-16check upvars in closures that are in staticsAriel Ben-Yehuda-0/+16
Fixes #27890 Fixes #28099 Fixes #28113
2015-10-16use the infcx tables to check if a closure is CopyAriel Ben-Yehuda-0/+25
Fixes #28550
2015-10-16rustc: Don't lint about isize/usize in FFIAlex Crichton-0/+22
This lint warning was originally intended to help against misuse of the old Rust `int` and `uint` types in FFI bindings where the Rust `int` was not equal to the C `int`. This confusion no longer exists (as Rust's types are now `isize` and `usize`), and as a result the need for this lint has become much less over time. Additionally, starting with [the RFC for libc][rfc] it's likely that `isize` and `usize` will be quite common in FFI bindings (e.g. they're the definition of `size_t` and `ssize_t` on many platforms). [rfc]: https://github.com/rust-lang/rfcs/pull/1291 This commit disables these lints to instead consider `isize` and `usize` valid types to have in FFI signatures.
2015-10-01Converted test to rpass.Vadim Chugunov-0/+17
2015-09-14Auto merge of #28392 - arielb1:sort-bounds-list, r=eddybbors-0/+20
The sort key is a (DefId, Name), which is *not* stable between runs, so we must re-sort when loading. Fixes #24063 Fixes #25467 Fixes #27222 Fixes #28377 r? @eddyb
2015-09-14Auto merge of #28383 - semarie:openbsd-jemalloc, r=alexcrichtonbors-3/+4
ignore severals tests under openbsd as we have disabling jemalloc under this target. r? @alexcrichton
2015-09-13Auto merge of #28339 - alexcrichton:stabilize-1.4, r=aturonbors-1/+1
The FCP is coming to a close and 1.4 is coming out soon, so this brings in the libs team decision for all library features this cycle. Stabilized APIs: * `<Box<str>>::into_string` * `Arc::downgrade` * `Arc::get_mut` * `Arc::make_mut` * `Arc::try_unwrap` * `Box::from_raw` * `Box::into_raw` * `CStr::to_str` * `CStr::to_string_lossy` * `CString::from_raw` * `CString::into_raw` * `IntoRawFd::into_raw_fd` * `IntoRawFd` * `IntoRawHandle::into_raw_handle` * `IntoRawHandle` * `IntoRawSocket::into_raw_socket` * `IntoRawSocket` * `Rc::downgrade` * `Rc::get_mut` * `Rc::make_mut` * `Rc::try_unwrap` * `Result::expect` * `String::into_boxed_slice` * `TcpSocket::read_timeout` * `TcpSocket::set_read_timeout` * `TcpSocket::set_write_timeout` * `TcpSocket::write_timeout` * `UdpSocket::read_timeout` * `UdpSocket::set_read_timeout` * `UdpSocket::set_write_timeout` * `UdpSocket::write_timeout` * `Vec::append` * `Vec::split_off` * `VecDeque::append` * `VecDeque::retain` * `VecDeque::split_off` * `rc::Weak::upgrade` * `rc::Weak` * `slice::Iter::as_slice` * `slice::IterMut::into_slice` * `str::CharIndices::as_str` * `str::Chars::as_str` * `str::split_at_mut` * `str::split_at` * `sync::Weak::upgrade` * `sync::Weak` * `thread::park_timeout` * `thread::sleep` Deprecated APIs * `BTreeMap::with_b` * `BTreeSet::with_b` * `Option::as_mut_slice` * `Option::as_slice` * `Result::as_mut_slice` * `Result::as_slice` * `f32::from_str_radix` * `f64::from_str_radix` Closes #27277 Closes #27718 Closes #27736 Closes #27764 Closes #27765 Closes #27766 Closes #27767 Closes #27768 Closes #27769 Closes #27771 Closes #27773 Closes #27775 Closes #27776 Closes #27785 Closes #27792 Closes #27795 Closes #27797
2015-09-13sort the existential bounds list in tydecodeAriel Ben-Yehuda-0/+20
The sort key is a (DefId, Name), which is *not* stable between runs, so we must re-sort when loading. Fixes #24063 Fixes #25467 Fixes #27222 Fixes #28377
2015-09-12disable jemalloc tests for openbsdSébastien Marie-3/+4
ignore severals tests under openbsd as we have disabling jemalloc under this target.
2015-09-11std: Stabilize/deprecate features for 1.4Alex Crichton-1/+1
The FCP is coming to a close and 1.4 is coming out soon, so this brings in the libs team decision for all library features this cycle. Stabilized APIs: * `<Box<str>>::into_string` * `Arc::downgrade` * `Arc::get_mut` * `Arc::make_mut` * `Arc::try_unwrap` * `Box::from_raw` * `Box::into_raw` * `CStr::to_str` * `CStr::to_string_lossy` * `CString::from_raw` * `CString::into_raw` * `IntoRawFd::into_raw_fd` * `IntoRawFd` * `IntoRawHandle::into_raw_handle` * `IntoRawHandle` * `IntoRawSocket::into_raw_socket` * `IntoRawSocket` * `Rc::downgrade` * `Rc::get_mut` * `Rc::make_mut` * `Rc::try_unwrap` * `Result::expect` * `String::into_boxed_slice` * `TcpSocket::read_timeout` * `TcpSocket::set_read_timeout` * `TcpSocket::set_write_timeout` * `TcpSocket::write_timeout` * `UdpSocket::read_timeout` * `UdpSocket::set_read_timeout` * `UdpSocket::set_write_timeout` * `UdpSocket::write_timeout` * `Vec::append` * `Vec::split_off` * `VecDeque::append` * `VecDeque::retain` * `VecDeque::split_off` * `rc::Weak::upgrade` * `rc::Weak` * `slice::Iter::as_slice` * `slice::IterMut::into_slice` * `str::CharIndices::as_str` * `str::Chars::as_str` * `str::split_at_mut` * `str::split_at` * `sync::Weak::upgrade` * `sync::Weak` * `thread::park_timeout` * `thread::sleep` Deprecated APIs * `BTreeMap::with_b` * `BTreeSet::with_b` * `Option::as_mut_slice` * `Option::as_slice` * `Result::as_mut_slice` * `Result::as_slice` * `f32::from_str_radix` * `f64::from_str_radix` Closes #27277 Closes #27718 Closes #27736 Closes #27764 Closes #27765 Closes #27766 Closes #27767 Closes #27768 Closes #27769 Closes #27771 Closes #27773 Closes #27775 Closes #27776 Closes #27785 Closes #27792 Closes #27795 Closes #27797
2015-09-11Update LLVM to fix nightly build failuresBjörn Steinbrink-1/+5
2015-09-08Add tests for #17001, #21449, #22992, #23208, #23442Andrew Paseltiner-0/+178
Closes #17001 Closes #21449 Closes #22992 Closes #23208 Closes #23442
2015-09-06Auto merge of #28270 - arielb1:raw-fat-ops, r=nrcbors-0/+141
r? @nrc Fixes #17736 Fixes #18829 Fixes #23888 Fixes #28236
2015-09-06implement raw fat pointer opsAriel Ben-Yehuda-0/+141
2015-09-05Auto merge of #28190 - arielb1:generic-key-entry, r=eddybbors-0/+15
Fixes #28181 This may fix #28151 r? @pnkfelix
2015-09-05Auto merge of #28242 - Diggsey:msvc-backtrace, r=alexcrichtonbors-6/+19
Currently LLVM does not generate the debug info required to get complete backtraces even when functions are inlined, so that part of the `run-pass/backtrace-debuginfo.rs` test is disabled when targetting MSVC. At worst this results in missing stack frames where functions have been inlined.
2015-09-05Add line numbers to MSVC backtraceDiggory Blake-6/+19
Add comments
2015-09-04Auto merge of #28201 - apasel422:issue-26205, r=nikomatsakisbors-0/+39
Closes #26205. r? @eddyb
2015-09-04Auto merge of #28069 - alexcrichton:rt-atexit, r=brsonbors-0/+25
This adds a call to `rt::cleanup` on `process::exit` to make sure we clean up after ourselves on the way out from Rust. Closes #28065
2015-09-04Add line numbers to windows-gnu backtracesDiggory Blake-11/+19
Fix formatting Remove unused imports Refactor Fix msvc build Fix line lengths Formatting Enable backtrace tests Fix using directive on mac pwd info Work-around buildbot PWD bug, and fix libbacktrace configuration Use alternative to `env -u` which is not supported on bitrig Disable tests on 32-bit windows gnu
2015-09-03Fix multiple mutable autoderefs with `Box`Andrew Paseltiner-0/+39
Closes #26205.
2015-09-03Fixes #27886 -- bitrig does not use jemalloc (yet)Dave Huseby-2/+3
2015-09-03create a region-map for types in genericsAriel Ben-Yehuda-0/+15
Fixes #28181 This may fix #28151
2015-09-02std: Run at_exit cleanup on process::exitAlex Crichton-0/+25
This adds a call to `rt::cleanup` on `process::exit` to make sure we clean up after ourselves on the way out from Rust. Closes #28065
2015-09-02Auto merge of #28148 - eefriedman:binary_heap, r=alexcrichtonbors-2/+2
2015-09-01Auto merge of #28132 - arielb1:uninstantiable, r=nikomatsakisbors-0/+13
It is *very* easy to bypass, and is a relic of a bygone age where the type-checker was *much* less robust. Fixes #27497 r? @nikomatsakis
2015-09-01Auto merge of #28130 - alexcrichton:fix-msvc-static-tls-dtor, r=brsonbors-0/+39
Running TLS destructors for a MSVC Windows binary requires the linker doesn't elide the `_tls_used` or `__tls_used` symbols (depending on the architecture). This is currently achieved via a `#[link_args]` hack but this only works for dynamically linked binaries because the link arguments aren't propagated to statically linked binaries. This commit alters the strategy to instead emit a volatile load from those symbols so LLVM can't elide it, forcing the reference to the symbol to stay alive as long as the callback function stays alive (which we've made sure of with the `#[linkage]` attribute). Closes #28111
2015-09-01std: Run TLS destructors in a statically linked binaryAlex Crichton-0/+39
Running TLS destructors for a MSVC Windows binary requires the linker doesn't elide the `_tls_used` or `__tls_used` symbols (depending on the architecture). This is currently achieved via a `#[link_args]` hack but this only works for dynamically linked binaries because the link arguments aren't propagated to statically linked binaries. This commit alters the strategy to instead emit a volatile load from those symbols so LLVM can't elide it, forcing the reference to the symbol to stay alive as long as the callback function stays alive (which we've made sure of with the `#[linkage]` attribute). Closes #28111
2015-09-01Add missing stability markings to BinaryHeap.Eli Friedman-2/+2
2015-08-31remove the is_instantiable checkAriel Ben-Yehuda-0/+13
Fixes #27497
2015-08-31Translate constructor arguments for zero-sized tuple structsJames Miller-0/+21
This was preventing any side-effects from the expressions from happening. Fixes #28114
2015-08-28add test for #20803Andrew Paseltiner-0/+19
closes #20803
2015-08-27Auto merge of #28001 - arielb1:dtor-fixes, r=pnkfelixbors-0/+48
r? @pnkfelix
2015-08-26Auto merge of #27992 - wthrowe:dead-main-2, r=alexcrichtonbors-0/+73
* Suppresses warnings that main is unused when testing (#12327) * Makes `--test` work with explicit `#[start]` (#11766) * Fixes some cases where the normal main would not be disabled by `--test`, resulting in compilation failures.
2015-08-25handle dtors having generics in an order different from their ADTAriel Ben-Yehuda-0/+48
Fixes #27997.
2015-08-25Auto merge of #27966 - GuillaumeGomez:iterator, r=alexcrichtonbors-0/+31
Part of #22709. cc @Veedrac r? @bluss I don't have added tests yet, I'll see how to do it tomorrow.
2015-08-24Remove #[start] as well as #[main] in --testWilliam Throwe-0/+16
Fixes #11766.
2015-08-24Move main removal to its own pass in --test modeWilliam Throwe-0/+24
This handles the case where the #[main] function is buried deeper in the ast than we search for #[test] functions. I'm not sure why one would want to do that, but since it works in standard compilation it should also work for tests.
2015-08-24Mark main-like functions allow(dead_code) in testsWilliam Throwe-0/+33
Fixes #12327.
2015-08-24Add test for LookupHost iterator Send/Sync traitsGuillaume Gomez-0/+31
2015-08-24Auto merge of #27239 - apasel422:issue-19102, r=huonwbors-0/+20
closes #19102
2015-08-22Auto merge of #27914 - pnkfelix:fix-fcnr-for-valgrind, r=alexcrichtonbors-4/+28
Fix (and extend) src/test/run-pass/foreign-call-no-runtime.rs While going over various problems signaled by valgrind when running `make check` on a build configured with `--enable-valgrind`, I discovered a bug in this test case. Namely, the test case was previously creating an `i32` (originally an `int` aka `isize` but then we changed the name and the fallback rules), and then reading from a `*const isize`. Valgrind rightly complains about this, since we are reading an 8 byte value on 64-bit systems, but in principle only 4 bytes have been initialized. (I wish this was the only valgrind unclean test, but unfortunately there are a bunch more. This was just the easiest/first one that I dissected.)
2015-08-22Auto merge of #27565 - TimNN:dead-visit-type-in-path, r=nrcbors-0/+68
Fixes #23808, passes `make check-stage1` `run-pass` and `run-fail` locally.
2015-08-22Auto merge of #27892 - nikomatsakis:issue-27583, r=pnkfelixbors-0/+81
Issue #27583 was caused by the fact that `LUB('a,'b)` yielded `'static`, even if there existed a region `'tcx:'a+'b`. This PR replaces the old very hacky code for computing how free regions relate to one another with something rather more robust. This solves the issue for #27583, though I think that similar bizarro bugs can no doubt arise in other ways -- the root of the problem is that the region-inference code was written in an era when a LUB always existed, but that hasn't held for some time. To *truly* solve this problem, it needs to be generalized to cope with that reality. But let's leave that battle for another day. r? @aturon
2015-08-21fix accidental reversal of 'static, and add a testNiko Matsakis-0/+25
2015-08-20Fix (and extend) src/test/run-pass/foreign-call-no-runtime.rsFelix S. Klock II-4/+28
While going over various problems signaled by valgrind when running `make check` on a build configured with `--enable-valgrind`, I discovered a bug in this test case. Namely, the test case was previously creating an `i32` (originally an `int` aka `isize` but then we changed the name and the fallback rules), and then reading from a `*const isize`. Valgrind rightly complains about this, since we are reading an 8 byte value on 64-bit systems, but in principle only 4 bytes have been initialized. (I wish this was the only valgrind unclean test, but unfortunately there are a bunch more. This was just the easiest/first one that I dissected.)
2015-08-19fallout of reworking rc and arc APIsAlexis Beingessner-2/+3
2015-08-19Auto merge of #27875 - alexcrichton:msvc-f32-rem, r=nrcbors-0/+27
Currently `f32 % f32` will generate a link error on 32-bit MSVC because LLVM will lower the operation to a call to the nonexistent function `fmodf`. Work around in this in the backend by lowering to a call to `fmod` instead with necessary extension/truncation between floats/doubles. Closes #27859