summary refs log tree commit diff
path: root/src/test/run-pass
AgeCommit message (Collapse)AuthorLines
2015-06-18Add a test for issue 26322Simonas Kazlauskas-0/+36
2015-06-17Clear cached landing pads before generating a call.Eli Friedman-0/+40
Using the wrong landing pad has obvious bad effects, like dropping a value twice. Testcase written by Alex Crichton. Fixes #25089.
2015-06-09collections: Make BinaryHeap panic safe in sift_up / sift_downUlrik Sverdrup-0/+108
Use a struct called Hole that keeps track of an invalid location in the vector and fills the hole on drop. I include a run-pass test that the current BinaryHeap fails, and the new one passes. Fixes #25842
2015-06-09std: Make abs() panic on overflow in debug modeAlex Crichton-0/+21
Debug overflow checks for arithmetic negation landed in #24500, at which time the `abs` method on signed integers was changed to using `wrapping_neg` to ensure that the function never panicked. This implied that `abs` of `INT_MIN` would return `INT_MIN`, another negative value. When this change was back-ported to beta, however, in #24708, the `wrapping_neg` function had not yet been backported, so the implementation was changed in #24785 to `!self + 1`. This change had the unintended side effect of enabling debug overflow checks for the `abs` function. Consequently, the current state of affairs is that the beta branch checks for overflow in debug mode for `abs` and the nightly branch does not. This commit alters the behavior of nightly to have `abs` always check for overflow in debug mode. This change is more consistent with the way the standard library treats overflow as well, and it is also not a breaking change as it's what the beta branch currently does (albeit if by accident). cc #25378
2015-05-15Auto merge of #25399 - kballard:crate-attributes-cfg_attr, r=alexcrichtonbors-0/+15
Stripping unconfigured items prior to collecting crate metadata means we can say things like `#![cfg_attr(foo, crate_type="lib")]`. Fixes #25347.
2015-05-14Auto merge of #24920 - alexcrichton:duration, r=aturonbors-2/+2
This commit is an implementation of [RFC 1040][rfc] which is a redesign of the currently-unstable `Duration` type. The API of the type has been scaled back to be more conservative and it also no longer supports negative durations. [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/1040-duration-reform.md The inner `duration` module of the `time` module has now been hidden (as `Duration` is reexported) and the feature name for this type has changed from `std_misc` to `duration`. All APIs accepting durations have also been audited to take a more flavorful feature name instead of `std_misc`. Closes #24874
2015-05-14Move configuration 1 phase before crate metadata collectionKevin Ballard-0/+15
Stripping unconfigured items prior to collecting crate metadata means we can say things like `#![cfg_attr(foo, crate_type="lib")]`. Fixes #25347.
2015-05-14Auto merge of #25338 - tamird:unignore-stage-tests, r=alexcrichtonbors-10/+0
We don't have any pending snapshot-requiring changes. Closes #20184. Works toward #3965.
2015-05-13std: Redesign Duration, implementing RFC 1040Alex Crichton-2/+2
This commit is an implementation of [RFC 1040][rfc] which is a redesign of the currently-unstable `Duration` type. The API of the type has been scaled back to be more conservative and it also no longer supports negative durations. [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/1040-duration-reform.md The inner `duration` module of the `time` module has now been hidden (as `Duration` is reexported) and the feature name for this type has changed from `std_misc` to `duration`. All APIs accepting durations have also been audited to take a more flavorful feature name instead of `std_misc`. Closes #24874
2015-05-13Unignore some tests in stage1Tamir Duberstein-10/+0
We don't have any pending snapshot-requiring changes. Tests which continue to be ignored are those that are broken by codegen changes.
2015-05-13Allow `T::C` syntax in match patterns to refer to trait-assosociated constants.Sean Patrick Santos-0/+4
2015-05-13Auto merge of #25344 - arielb1:fresh-float, r=nikomatsakisbors-0/+30
There is no subtyping relationship between the types (or their non-freshened variants), so they can not be merged. Fixes #22645 Fixes #24352 Fixes #23825 Should fix #25235 (no test in issue). Should fix #19976 (test is outdated).
2015-05-13Tests for custom coercionsNick Cameron-0/+91
2015-05-13Fix a bunch of bugsNick Cameron-0/+49
* segfault due to not copying drop flag when coercing * fat pointer casts * segfault due to not checking drop flag properly * debuginfo for DST smart pointers * unreachable code in drop glue
2015-05-12Create a FreshFloatTy separate from FreshIntTyAriel Ben-Yehuda-0/+30
There is no subtyping relationship between the types (or their non-freshened variants), so they can not be merged. Fixes #22645 Fixes #24352 Fixes #23825 Should fix #25235 (no test in issue). Should fix #19976 (test is outdated).
2015-05-12Rollup merge of #25329 - jooert:tests, r=alexcrichtonManish Goregaokar-0/+16
2015-05-12Auto merge of #25300 - kballard:core-slice-overflow, r=Gankrobors-0/+60
core::slice was originally written to tolerate overflow (notably, with slices of zero-sized elements), but it was never updated to use wrapping arithmetic when overflow traps were added. Also correctly handle the case of calling .nth() on an Iter with a zero-sized element type. The iterator was assuming that the pointer value of the returned reference was meaningful, but that's not true for zero-sized elements. Fixes #25016.
2015-05-12Auto merge of #25171 - quantheory:associated_time_long_paths, r=nikomatsakisbors-0/+55
It is currently broken to use syntax such as `<T as Foo>::U::static_method()` where `<T as Foo>::U` is an associated type. I was able to fix this and simplify the parser a bit at the same time. This also fixes the corresponding issue with associated types (#22139), but that's somewhat irrelevant because #22519 is still open, so this syntax still causes an error in type checking. Similarly, although this fix applies to associated consts, #25046 forbids associated constants from using type parameters or `Self`, while #19559 means that associated types have to always have one of those two. Therefore, I think that you can't use an associated const from an associated type anyway.
2015-05-12Add regression test for #18075Johannes Oertel-0/+16
Closes #18075.
2015-05-12Auto merge of #23424 - arielb1:ambiguous-project, r=nikomatsakisbors-0/+20
r? @nikomatsakis
2015-05-11Avoid returning a slice with a null pointer from Iter.as_slice()Kevin Ballard-3/+29
core::slice::Iter.ptr can be null when iterating a slice of zero-sized elements, but the pointer value used for the slice itself cannot. Handle this case by always returning a dummy pointer for slices of zero-sized elements.
2015-05-11Handle overflow properly in core::sliceKevin Ballard-0/+34
core::slice was originally written to tolerate overflow (notably, with slices of zero-sized elements), but it was never updated to use wrapping arithmetic when overflow traps were added. Also correctly handle the case of calling .nth() on an Iter with a zero-sized element type. The iterator was assuming that the pointer value of the returned reference was meaningful, but that's not true for zero-sized elements. Fixes #25016.
2015-05-11Auto merge of #25085 - carols10cents:remove-old-tilde, r=steveklabnikbors-13/+9
There were still some mentions of `~[T]` and `~T`, mostly in comments and debugging statements. I tried to do my best to preserve meaning, but I might have gotten some wrong-- I'm happy to fix anything :)
2015-05-09Rollup merge of #25216 - barosl:no-more-task, r=ManishearthManish Goregaokar-14/+14
I've found that there are still huge amounts of occurrences of `task`s in the documentation. This PR tries to eliminate all of them in favor of `thread`.
2015-05-09Squeeze the last bits of `task`s in documentation in favor of `thread`Barosl Lee-14/+14
An automated script was run against the `.rs` and `.md` files, subsituting every occurrence of `task` with `thread`. In the `.rs` files, only the texts in the comment blocks were affected.
2015-05-08fallout to run-pass tests.Felix S. Klock II-3/+3
2015-05-07Select projections over impls in case of ambiguity. Fixes #23336.Ariel Ben-Yehuda-0/+20
2015-05-07Auto merge of #25161 - jooert:moretests, r=alexcrichtonbors-0/+75
The last one (at least for the moment :smiley:). r? @alexcrichton
2015-05-07Rollup merge of #25138 - tshepang:typos, r=sanxiynSteve Klabnik-1/+1
2015-05-07Fix use of UFCS syntax to call methods on associated types.Sean Patrick Santos-0/+55
2015-05-06Auto merge of #24392 - seanmonstar:lint-transmute-mut, r=alexcrichtonbors-2/+2
The [UnsafeCell documentation says it is undefined behavior](http://doc.rust-lang.org/nightly/std/cell/struct.UnsafeCell.html), so people shouldn't do it. This happened to catch one case in libstd that was doing this, and I switched that to use an UnsafeCell internally. Closes #13146
2015-05-07Add regression test for #22463Johannes Oertel-0/+29
Closes #22463.
2015-05-07Add regression test for #22258Johannes Oertel-0/+19
Closes #22258.
2015-05-07Add regression test for #21562Johannes Oertel-0/+27
Closes #21562.
2015-05-06Auto merge of #25117 - jooert:tests, r=alexcrichtonbors-0/+59
2015-05-05test: update run-pass tests to not use mutable transmutingSean McArthur-2/+2
2015-05-06fix typos caught by codespellTshepang Lekhonkhobe-1/+1
2015-05-05Auto merge of #24979 - jooert:test-22471, r=pnkfelixbors-0/+13
Closes #22471.
2015-05-05Add regression tests for #21174Johannes Oertel-0/+20
Closes #21174.
2015-05-05Add regression test for #20186Johannes Oertel-0/+23
Closes #20186.
2015-05-05Add regression test for #20174Johannes Oertel-0/+16
Closes #20174.
2015-05-05Auto merge of #25113 - pnkfelix:dropck-itemless-traits, r=huonwbors-0/+81
Generalize dropck to ignore item-less traits Fix #24805. (This is the reopened + rebased version of PR #24898)
2015-05-04Auto merge of #25056 - jooert:sometests, r=alexcrichtonbors-41/+51
Add several regression tests and remove some unnecessary FIXMEs.
2015-05-04Remove several FIXMEsJohannes Oertel-41/+16
2015-05-04Add regression test for #22471Johannes Oertel-0/+13
Closes #22471.
2015-05-04Auto merge of #25043 - alexcrichton:musl-out-of-stack, r=nikomatsakisbors-0/+1
Stack overflow detection does not currently work with MUSL, so this test needs to be disabled.
2015-05-03Update tests to not use old ~ syntaxCarol Nichols-8/+8
2015-05-03Update old uses of ~ in comments and debugging statementsCarol Nichols-5/+1
2015-05-03librustc_trans: Handle DST structs in trans::_match.Luqman Aden-0/+70
2015-05-02Add regression test for #17170Johannes Oertel-0/+20
Closes #17170.