Commit Graph

107 Commits

Author SHA1 Message Date
Alex Crichton 61e89446ef Remove all jemalloc-related content
This commit removes all jemalloc related submodules, configuration, etc,
from the bootstrap, from the standard library, and from the compiler.
This will be followed up with a change to use jemalloc specifically as
part of rustc on blessed platforms.
2018-11-02 06:52:56 -07:00
Alex Crichton d0060d72e5 Bump nightly to 1.32.0
* Also update the bootstrap compiler
* Update cargo to 1.32.0
* Clean out stage0 annotations
2018-10-31 11:53:50 -07:00
Sebastian Dröge 52cc6fde4b Stabilize slice::rchunks(), rchunks_mut(), rchunks_exact(), rchunk_exact_mut()
Fixes #55177
2018-10-18 18:51:56 +03:00
Sebastian Dröge b08ca2958e Stabilize slice::chunks_exact() and slice::chunks_exact_mut()
Fixes #47115
2018-10-18 18:51:56 +03:00
Sebastian Dröge 80a8e5c1f7 Add slice::rchunks(), rchunks_mut(), rchunks_exact() and rchunks_exact_mut()
These work exactly like the normal chunks iterators but start creating
chunks from the end of the slice.

See #55177 for the tracking issue
2018-10-18 10:38:05 +03:00
Oliver Schneider ec74d3533a Stabilize min_const_fn 2018-10-05 10:36:14 +02:00
Josh Stone ce034951fb Bump to 1.31.0 and bootstrap from 1.30 beta 2018-09-27 20:52:53 -07:00
Sebastian Dröge e09e45041b Rename slice::exact_chunks() to slice::chunks_exact()
See https://github.com/rust-lang/rust/issues/47115#issuecomment-403090815
and https://github.com/rust-lang/rust/issues/47115#issuecomment-424053547
2018-09-24 22:43:06 +03:00
bors 8b7f164eab Auto merge of #52994 - varkor:trim_direction, r=alexcrichton
Add trim_start, trim_end etc.; deprecate trim_left, trim_right, etc. in future

Adds the methods: `trim_start`, `trim_end`, `trim_start_matches` and `trim_end_matches`.
Deprecates `trim_left`, `trim_right`, `trim_left_matches` and `trim_right_matches` starting from Rust 1.33.0, three versions from when they'll initially be marked as being deprecated, using the future deprecation from https://github.com/rust-lang/rust/issues/30785 and https://github.com/rust-lang/rust/pull/51681.

Fixes https://github.com/rust-lang/rust/issues/30459.
2018-09-05 23:45:08 +00:00
Mark Rousskov 9ec5ef541a Breaking change upgrades 2018-09-04 13:22:08 -06:00
Oliver Schneider d125e904b5 Restrict most uses of const_fn to min_const_fn 2018-08-31 08:40:00 +02:00
Sergio Benitez ed0bd38cac Stabilize 'attr_literals' feature. 2018-08-23 19:06:07 -07:00
varkor ff79670569 Remove old tests 2018-08-19 22:36:59 +01:00
bors d5b6b95aef Auto merge of #52553 - Pazzaz:vecdeque-append, r=SimonSapin
Non-naive implementation of `VecDeque.append`

Replaces the old, simple implementation with a more manual (and **unsafe** 😱) one. I've added 1 more test and verified that it covers all 6 code paths in the function.

This new implementation was about 60% faster than the old naive one when I tried benchmarking it.
2018-08-18 08:56:12 +00:00
Pazzaz b063bd4616 Test VecDeque append not dropping twice 2018-08-15 19:42:07 +02:00
varkor 3e10ffcb81 Make features stable and clarify examples 2018-08-05 22:48:30 +01:00
varkor 319b052357 Fix stage 2 tests 2018-08-05 15:54:49 +01:00
varkor 64185f205d Remove unnecessary or invalid feature attributes 2018-08-05 15:54:48 +01:00
varkor aecf8c2a62 Add trim_start, trim_end, trim_start_matches and trim_end_matches 2018-08-02 20:39:29 +01:00
kennytm 2c088cb03e Rollup merge of #52769 - sinkuu:stray_test, r=alexcrichton
Incorporate a stray test

`liballoc/repeat-generic-slice.rs` doesn't seem to be tested (I think it was intended to be placed in `run-pass`). This PR incorporates the test into `liballoc/tests`.
2018-07-28 16:25:04 +08:00
Shotaro Yamada b326e71b79 Incorporate a stray test 2018-07-27 18:07:20 +09:00
Tatsuyuki Ishi 66c4dc9769 Add missing dyn 2018-07-25 10:24:31 +09:00
Pazzaz 9f1fdecb3c Simplify vecdeque append test 2018-07-22 22:15:29 +02:00
kennytm 67cf3ba528 Rollup merge of #51807 - newpavlov:deprecate_str_slice, r=alexcrichton
Deprecation of str::slice_unchecked(_mut)

Closes #51715

I am not sure if 1.28.0 or 1.29.0 should be used for deprecation version, for now it's 1.28.0.

Additionally I've replaced `slice_unchecked` uses with `get_unchecked`. The only places where this method is still used are `src/liballoc/tests/str.rs` and `src/liballoc/tests/str.rs`.
2018-07-22 22:10:09 +08:00
Pazzaz 24bc854b8c Non-naive implementation for VecDeque.append 2018-07-19 23:32:22 +02:00
Simon Sapin 5717d99d1b Add some unit tests for dangling Weak references 2018-07-07 01:41:30 +02:00
newpavlov aaf2004f78 removed slice_uncheked from src/liballoc/tests/str.rs 2018-06-26 15:33:57 +03:00
bors b4d836c98b Auto merge of #51320 - tmccombs:step-by, r=SimonSapin
Stabilize Iterator::step_by

Fixes #27741
2018-06-10 01:45:42 +00:00
Thayne McCombs 72e17b81fa Stabilize Iterator::step_by
Fixes #27741
2018-06-02 20:42:42 -06:00
kennytm 0ff8d40fa1 impl Default for &mut str 2018-06-03 00:29:50 +08:00
Emerentius b2fd7da0cf add more join tests
old tests cover the new fast path of str joining already
this adds tests for joining into Strings with long separators (>4 byte) and
for joining into Vec<T>, T: Clone + !Copy. Vec<T: Copy> will be
specialised when specialisation type inference bugs are fixed.
2018-06-01 17:13:25 +02:00
bors 65a16c0007 Auto merge of #49283 - varkor:combining-chars-escape_debug, r=SimonSapin
Escape combining characters in char::Debug

Although combining characters are technically printable, they make little sense to print on their own with `Debug`: it'd be better to escape them like non-printable characters.

This is a breaking change, but I imagine the fact `escape_debug` is rare and almost certainly primarily used for debugging that this is an acceptable change.
Resolves #41922.

r? @alexcrichton
cc @clarcharr
2018-05-21 23:26:32 +00:00
varkor 2fa22effb6 Avoid counting characters and add explanatory comment to test 2018-05-21 18:57:54 +01:00
varkor c51f002802 Only escape extended grapheme characters in the first position 2018-05-21 18:57:54 +01:00
varkor 8c89e7f3d5 Make {char, str}::escape_debug and impl Debug for {char, str} consistent 2018-05-21 18:57:54 +01:00
varkor edad2eff0c Stabilise inclusive_range_methods 2018-05-17 20:58:28 +01:00
Alex Crichton 2c5d13dc9c Skip a memory-hungry test that OOMs
Attempting to fix https://travis-ci.org/rust-lang/rust/jobs/377407894 via some
selective ignoring tests
2018-05-10 14:11:17 -07:00
Alex Crichton cff1a263c9 Rollup merge of #50010 - ExpHP:slice-bounds, r=alexcrichton
Give SliceIndex impls a test suite of girth befitting the implementation (and fix a UTF8 boundary check)

So one day I was writing something in my codebase that basically amounted to `impl SliceIndex for (Bound<usize>, Bound<usize>)`, and I said to myself:

*Boy, gee, golly!  I never realized bounds checking was so tricky!*

At some point when I had around 60 lines of tests for it, I decided to go see how the standard library does it to see if I missed any edge cases. ...That's when I discovered that libcore only had about 40 lines of tests for slicing altogether, and none of them even used `..=`.

---

This PR includes:

* **Literally the first appearance of the word `get_unchecked_mut` in any directory named `test` or `tests`.**
* Likewise the first appearance of `get_mut` used with _any type of range argument_ in these directories.
* Tests for the panics on overflow with `..=`.
    * I wanted to test on `[(); usize::MAX]` as well but that takes linear time in debug mode </3
* A horrible and ugly test-generating macro for the `should_panic` tests that increases the DRYness by a single order of magnitude (which IMO wasn't enough, but I didn't want to go any further and risk making the tests inaccessible to next guy).
* Same stuff for str!
    * Actually, the existing `str` tests were pretty good. I just helped filled in the holes.
* [A fix for the bug it caught](https://github.com/rust-lang/rust/issues/50002).  (only one ~~sadly~~)
2018-05-10 11:35:17 -05:00
bors a4a7947259 Auto merge of #49724 - kennytm:range-inc-start-end-methods, r=Kimundi
Introduce RangeInclusive::{new, start, end} methods and make the fields private.

cc #49022
2018-05-01 10:10:46 +00:00
Michael Lamparski f1d7b453fe revise test gen macro for str 2018-04-30 11:53:51 -04:00
kennytm fba903a435 Make the fields of RangeInclusive private.
Added new()/start()/end() methods to RangeInclusive.

Changed the lowering of `..=` to use RangeInclusive::new().
2018-04-30 21:01:13 +08:00
Michael Lamparski 02b3da1200 decrease false negatives for str overflow test 2018-04-30 07:37:19 -04:00
Michael Lamparski ce66f5d918 flesh out tests for SliceIndex
m*n lines of implementation deserves m*n lines of tests
2018-04-30 07:37:08 -04:00
Michael Lamparski 0842dc6723 collect str SliceIndex tests into a mod
GitHub users: I think you can add ?w=1 to the url
for a vastly cleaner whitespace-ignoring diff
2018-04-30 07:37:02 -04:00
Zack M. Davis 3dbdccc6a9 stabilize #[must_use] for functions and must-use operators
This is in the matter of RFC 1940 and tracking issue #43302.
2018-04-28 20:32:49 -07:00
Michael Lamparski 90b361b3a7 fix my unit test that was horrendously wrong
and add one for non-mut slicing since I touched that method too
2018-04-18 16:48:56 -04:00
Michael Lamparski b74d6922ff smaller PR just to fix #50002 2018-04-17 21:31:35 -04:00
Mike Hommey fddf51ee0b Use NonNull<Void> instead of *mut u8 in the Alloc trait
Fixes #49608
2018-04-12 22:53:22 +02:00
Simon Sapin 93a9ad4897 Remove the now-unit-struct AllocErr field inside CollectionAllocErr 2018-04-12 22:53:13 +02:00
Simon Sapin e521b8b472 Actually deprecate the Heap type 2018-04-12 22:52:47 +02:00