summary refs log tree commit diff
path: root/src/test
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/+53
Fixes #27890 Fixes #28099 Fixes #28113
2015-10-16Warn on `pub extern crate`.Nick Cameron-0/+18
Temporary 'fix' for #26775
2015-10-16use the infcx tables to check if a closure is CopyAriel Ben-Yehuda-0/+25
Fixes #28550
2015-10-16don't crash when there are multiple conflicting implementations of DropAriel Ben-Yehuda-0/+23
Fixes #28568
2015-10-16show each object-safety violation onceAriel Ben-Yehuda-0/+23
different supertraits can suffer from the same object-safety violation, leading to duplication in the error message. Avoid it. Fixes #20692
2015-10-16deduplicate trait errors before they are displayedAriel Ben-Yehuda-39/+36
Because of type inference, duplicate obligations exist and cause duplicate errors. To avoid this, only display the first error for each (predicate,span). The inclusion of the span is somewhat bikesheddy, but *is* the more conservative option (it does not remove some instability, as duplicate obligations are ignored by `duplicate_set` under some inference conditions). Fixes #28098 cc #21528 (is it a dupe?)
2015-10-16rustc: Don't lint about isize/usize in FFIAlex Crichton-8/+10
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-10/+6
2015-10-01Fix dllimports of static data from rlibsVadim Chugunov-0/+36
2015-09-15Auto merge of #28406 - petrochenkov:primitive, r=eddybbors-0/+2
This was missing from https://github.com/rust-lang/rust/pull/27451 r? @eddyb
2015-09-15Auto merge of #28395 - ebfull:fix-associated-item-resolution, r=arielb1bors-0/+51
Fixes #28344
2015-09-15Auto merge of #28351 - jonas-schievink:macro-bt, r=nrcbors-16/+19
The second commit in this PR will stop printing the macro definition site in backtraces, which cuts their length in half and increases readability (the definition site was only correct for local macros). The third commit will not print an invocation if the last one printed occurred at the same place (span). This will make backtraces caused by a self-recursive macro much shorter. (A possible alternative would be to capture the backtrace first, then limit it to a few frames at the start and end of the chain and print `...` inbetween. This would also work with multiple macros calling each other, which is not addressed by this PR - although the backtrace will still be halved) Example: ```rust macro_rules! m { ( 0 $($t:tt)* ) => ( m!($($t)*); ); () => ( fn main() {0} ); } m!(0 0 0 0 0 0 0 0 0 0 0 0 0 0 0); ``` On a semi-recent nightly, this yields: ``` test.rs:3:21: 3:22 error: mismatched types: expected `()`, found `_` (expected (), found integral variable) [E0308] test.rs:3 () => ( fn main() {0} ); ^ test.rs:1:1: 4:2 note: in expansion of m! test.rs:2:23: 2:34 note: expansion site test.rs:1:1: 4:2 note: in expansion of m! test.rs:2:23: 2:34 note: expansion site test.rs:1:1: 4:2 note: in expansion of m! test.rs:2:23: 2:34 note: expansion site test.rs:1:1: 4:2 note: in expansion of m! test.rs:2:23: 2:34 note: expansion site test.rs:1:1: 4:2 note: in expansion of m! test.rs:2:23: 2:34 note: expansion site test.rs:1:1: 4:2 note: in expansion of m! test.rs:2:23: 2:34 note: expansion site test.rs:1:1: 4:2 note: in expansion of m! test.rs:2:23: 2:34 note: expansion site test.rs:1:1: 4:2 note: in expansion of m! test.rs:2:23: 2:34 note: expansion site test.rs:1:1: 4:2 note: in expansion of m! test.rs:2:23: 2:34 note: expansion site test.rs:1:1: 4:2 note: in expansion of m! test.rs:2:23: 2:34 note: expansion site test.rs:1:1: 4:2 note: in expansion of m! test.rs:2:23: 2:34 note: expansion site test.rs:1:1: 4:2 note: in expansion of m! test.rs:2:23: 2:34 note: expansion site test.rs:1:1: 4:2 note: in expansion of m! test.rs:2:23: 2:34 note: expansion site test.rs:1:1: 4:2 note: in expansion of m! test.rs:2:23: 2:34 note: expansion site test.rs:1:1: 4:2 note: in expansion of m! test.rs:2:23: 2:34 note: expansion site test.rs:1:1: 4:2 note: in expansion of m! test.rs:6:1: 6:35 note: expansion site test.rs:3:21: 3:22 help: run `rustc --explain E0308` to see a detailed explanation error: aborting due to previous error ``` After this patch: ``` test.rs:3:21: 3:22 error: mismatched types: expected `()`, found `_` (expected (), found integral variable) [E0308] test.rs:3 () => ( fn main() {0} ); ^ test.rs:2:23: 2:34 note: in this expansion of m! test.rs:6:1: 6:35 note: in this expansion of m! test.rs:3:21: 3:22 help: run `rustc --explain E0308` to see a detailed explanation error: aborting due to previous error ```
2015-09-15Prohibit renaming to primitive types' names in import listsVadim Petrochenkov-0/+2
2015-09-14Auto merge of #28247 - christopherdumas:fix_28243, r=eddybbors-0/+16
as per #28243.
2015-09-14Auto merge of #28248 - PeterReid:master, r=alexcrichtonbors-0/+16
Overflows in integer pow() computations would be missed if they preceded a 0 bit of the exponent being processed. This made calls such as 2i32.pow(1024) not trigger an overflow. Fixes #28012
2015-09-14Fix tuple float bug.christopherdumas-0/+16
2015-09-14Auto merge of #28358 - dotdash:nounwind, r=alexcrichtonbors-0/+23
This allows to skip the codegen for all the unneeded landing pads, reducing code size across the board by about 2-5%, depending on the crate. Compile times seem to be pretty unaffected though :-/
2015-09-14Mark all extern functions as nounwindBjörn Steinbrink-0/+23
Unwinding across an FFI boundary is undefined behaviour, so we can mark all external function as nounwind. The obvious exception are those functions that actually perform the unwinding.
2015-09-14Auto merge of #28396 - arielb1:misplaced-binding, r=eddybbors-0/+31
Technically a [breaking-change], but the broken code is useless, like `i32<Param=()>`. Fixes #24682 r? @eddyb
2015-09-14Auto merge of #28392 - arielb1:sort-bounds-list, r=eddybbors-0/+40
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-13Added test for partially supplied type params in which remaining reference ↵Sean Bowe-0/+2
non-existant self
2015-09-14Auto merge of #28383 - semarie:openbsd-jemalloc, r=alexcrichtonbors-3/+6
ignore severals tests under openbsd as we have disabling jemalloc under this target. r? @alexcrichton
2015-09-13Add test for overflowing powPeter Reid-0/+16
This would catch regressions of issue #28012.
2015-09-13Auto merge of #28178 - christopherdumas:fix_ice, r=nikomatsakisbors-0/+18
This fixes the ICE, and makes it just a compiler error/warning. I'm not exactly sure that's whats wanted, so tell me if it isn't.
2015-09-13ensure projections are prohibited when type parameters areAriel Ben-Yehuda-0/+31
Technically a [breaking-change], but the broken code is useless, like `i32<Param=()>`. Fixes #24682
2015-09-13Fixed regression in associated item resolution with default type parameters ↵Sean Bowe-0/+49
that reference Self in traits.
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/+40
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/+6
ignore severals tests under openbsd as we have disabling jemalloc under this target.
2015-09-11Auto merge of #28350 - dotdash:llvm_fix, r=eddybbors-1/+5
2015-09-11Fixed testchristopherdumas-1/+3
2015-09-11Auto merge of #28348 - petrochenkov:novirt, r=alexcrichtonbors-3/+2
Noticed these yesterday while reading libsyntax
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-11Remove some remains of virtual structs from the parserVadim Petrochenkov-3/+2
2015-09-10Added testchristopherdumas-0/+16
2015-09-11Auto merge of #28337 - apasel422:tests, r=alexcrichtonbors-0/+13
Closes #17994.
2015-09-10Auto merge of #28321 - nikomatsakis:issue-27616, r=pnkfelixbors-0/+34
Fixes #27616. r? @pnkfelix
2015-09-10Don't print the macro definition site in backtracesJonas Schievink-16/+19
This halves the backtrace length. The definition site wasn't very useful anyways, since it may be invalid (for compiler expansions) or located in another crate. Since the macro name is still printed, grepping for it is still an easy way of finding the definition.
2015-09-10Add test for #17994Andrew Paseltiner-0/+13
Closes #17994.
2015-09-10Add tests for #22638, #22872, #23024, #23046Andrew Paseltiner-0/+156
Closes #22638. Closes #22872. Closes #23024. Closes #23046.
2015-09-09Treat loans of 'static data as extending to the end of the enclosingNiko Matsakis-0/+34
fn. Fixes #27616.
2015-09-09Auto merge of #28299 - apasel422:tests, r=alexcrichtonbors-0/+208
Closes #17001 Closes #21449 Closes #22992 Closes #23208 Closes #23442
2015-09-09Auto merge of #28300 - Manishearth:crate_err, r=eddybbors-0/+71
Partially fixes #22750 I'll write a test for this when I figure out how to. r? @eddyb cc @steveklabnik
2015-09-09Auto merge of #28277 - DiamondLovesYou:intrinsic-unnamed-addr, r=huonwbors-0/+22
Intrinsics never have an address, so it doesn't make sense to say that their address is unnamed.
2015-09-08Add tests for #17001, #21449, #22992, #23208, #23442Andrew Paseltiner-0/+208
Closes #17001 Closes #21449 Closes #22992 Closes #23208 Closes #23442
2015-09-09Print correct crate nameManish Goregaokar-2/+2
2015-09-09Add testManish Goregaokar-0/+71