1190 Commits

Author SHA1 Message Date
Niv Kaminer
3753e1a55a update FIXME(#5244) to point to RFC 1109 (Non-Copy array creation ergonomics) 2018-03-17 20:24:49 +02:00
varkor
b430cba343 Fix use of unstable feature in test 2018-03-17 17:25:23 +00:00
varkor
f41a26f204 Add sort_by_cached_key method 2018-03-16 14:39:53 +00:00
varkor
bdcc6f939a Index enumeration by minimally sized type 2018-03-16 13:57:08 +00:00
varkor
7dcfc07d2c Cull the quadratic 2018-03-16 13:57:08 +00:00
varkor
21fde0903b Update documentation 2018-03-16 13:57:07 +00:00
varkor
9fbee359d7 Add a test for sort_by_key 2018-03-16 13:57:07 +00:00
varkor
b8452cc326 Clarify behaviour of sort_unstable_by_key with respect to sort_by_key 2018-03-16 13:57:07 +00:00
varkor
670e69e207 Update documentation for sort_by_key 2018-03-16 13:57:07 +00:00
varkor
ea6a1bdf6b Compute each key only one during slice::sort_by_key 2018-03-16 13:57:07 +00:00
Simon Sapin
f0ad533fe3 Remove deprecated unstable alloc::heap::EMPTY constant 2018-03-16 11:45:16 +01:00
bors
36b6687318 Auto merge of #49051 - kennytm:rollup, r=kennytm
Rollup of 17 pull requests

- Successful merges: #48706, #48875, #48892, #48922, #48957, #48959, #48961, #48965, #49007, #49024, #49042, #49050, #48853, #48990, #49037, #49049, #48972
- Failed merges:
2018-03-16 00:09:14 +00:00
boats
81d0ecef2c
Pin and PinBox are fundamental. 2018-03-15 16:16:11 -07:00
boats
2f1c24a60d
CoerceUnsized for PinBox 2018-03-15 16:10:18 -07:00
boats
e3c5f6958f
Add liballoc APIs. 2018-03-15 13:01:28 -07:00
snf
9e64946bde setting ABORTING_MALLOC for asmjs backend 2018-03-15 17:43:05 +00:00
bors
3926453944 Auto merge of #47813 - kennytm:stable-incl-range, r=nrc
Stabilize inclusive range (`..=`)

Stabilize the followings:

* `inclusive_range` — The `std::ops::RangeInclusive` and `std::ops::RangeInclusiveTo` types, except its fields (tracked by #49022 separately).
* `inclusive_range_syntax` — The `a..=b` and `..=b` expression syntax
* `dotdoteq_in_patterns` — Using `a..=b` in a pattern

cc #28237
r? @rust-lang/lang
2018-03-15 16:00:40 +00:00
kennytm
939cfa251a
Keep the fields of RangeInclusive unstable. 2018-03-15 17:01:30 +08:00
kennytm
92d1f8d8e4
Stabilize inclusive_range_syntax language feature.
Stabilize the syntax `a..=b` and `..=b`.
2018-03-15 16:58:02 +08:00
kennytm
b5913f2e76
Stabilize inclusive_range library feature.
Stabilize std::ops::RangeInclusive and std::ops::RangeInclusiveTo.
2018-03-15 16:58:01 +08:00
snf
b08b5ae0ec try_reserve: disabling tests for asmjs, blocked by #48968 2018-03-14 03:48:42 -07:00
snf
92bfcd2b19 implementing fallible allocation API (try_reserve) for Vec, String and HashMap 2018-03-14 03:48:42 -07:00
Simon Sapin
4897935e86 Add hexadecimal formatting of integers with fmt::Debug
This can be used for integers within a larger types which implements Debug
(possibly through derive) but not fmt::UpperHex or fmt::LowerHex.

```rust
assert!(format!("{:02x?}", b"Foo\0") == "[46, 6f, 6f, 00]");
assert!(format!("{:02X?}", b"Foo\0") == "[46, 6F, 6F, 00]");
```

RFC: https://github.com/rust-lang/rfcs/pull/2226
2018-03-13 14:53:06 +01:00
kennytm
5d0918908a
Rollup merge of #48877 - GuillaumeGomez:vec-missing-links, r=QuietMisdreavus
Add missing urls

r? @QuietMisdreavus
2018-03-13 00:54:28 +08:00
Alex Crichton
994bfd4141 Update Cargo submodule
Required moving all fulldeps tests depending on `rand` to different locations as
now there's multiple `rand` crates that can't be implicitly linked against.
2018-03-11 10:59:28 -07:00
Guillaume Gomez
a63bf3bb10 Add missing urls 2018-03-09 14:08:59 +01:00
kennytm
8e3493d459
Rollup merge of #47463 - bluss:fused-iterator, r=alexcrichton
Stabilize FusedIterator

FusedIterator is a marker trait that promises that the implementing
iterator continues to return `None` from `.next()` once it has returned
`None` once (and/or `.next_back()`, if implemented).

The effects of FusedIterator are already widely available through
`.fuse()`, but with stable `FusedIterator`, stable Rust users can
implement this trait for their iterators when appropriate.

Closes #35602
2018-03-06 20:52:37 +08:00
kennytm
46d629a1d7
Rollup merge of #48657 - sinkuu:opt_str_repeat, r=dtolnay
Optimize str::repeat

Improves the performance of `str::repeat` by bulk copying. Here is the benchmarks of `"abcde".repeat(n)`:

|`n`|old [ns/iter]|new [ns/iter]|diff [%]|
---|---|---|---
|1|27.205|27.421|+0.794|
|2|27.500|27.516|+0.0581|
|3|27.923|27.648|-0.985|
|4|31.206|30.145|-3.40|
|5|35.144|31.861|-9.34|
|7|43.131|34.621|-19.7|
|10|54.945|36.203|-34.1|
|100|428.31|52.895|-87.7|
2018-03-06 20:52:28 +08:00
Shotaro Yamada
3d58543d49 Avoid unnecessary calculation 2018-03-04 09:43:29 +09:00
Shotaro Yamada
683bdc7f0a Add comments 2018-03-04 09:00:09 +09:00
Ulrik Sverdrup
c7c23fe948 core: Update stability attributes for FusedIterator 2018-03-03 14:23:05 +01:00
Ulrik Sverdrup
bc651cac8d core: Stabilize FusedIterator
FusedIterator is a marker trait that promises that the implementing
iterator continues to return `None` from `.next()` once it has returned
`None` once (and/or `.next_back()`, if implemented).

The effects of FusedIterator are already widely available through
`.fuse()`, but with stable `FusedIterator`, stable Rust users can
implement this trait for their iterators when appropriate.
2018-03-03 14:14:03 +01:00
Jonathan Behrens
370df40dab Don't have Vec<T> delegate to [T]'s bounds for indexing 2018-03-02 23:25:52 -05:00
Jonathan Behrens
45bdf9cbee Update comments 2018-03-02 23:25:52 -05:00
Jonathan Behrens
46fef766b0 Have Vec use slice's implementations of Index<I> and IndexMut<I> 2018-03-02 23:25:52 -05:00
Shotaro Yamada
08504fbb0b Optimize str::repeat 2018-03-02 18:12:22 +09:00
kennytm
ef44e63da6
Rollup merge of #48450 - frewsxcv:frewsxcxv-stabilize-slice-rotatee, r=alexcrichton
Stabilize [T]::rotate_{left,right}

https://github.com/rust-lang/rust/issues/41891
2018-02-28 19:15:32 +08:00
kennytm
b443e57ce6
Rollup merge of #48166 - hedgehog1024:hedgehog1024-stabilize-entry_and_modify, r=alexcrichton
Stabilize 'entry_and_modify' feature

Stabilize `entry_and_modify` feature introduced by #44734.

Closes #44733
2018-02-25 15:54:42 +08:00
Manish Goregaokar
0aa753ba30
1.25.0 -> 1.26.- 2018-02-25 14:24:24 +08:00
Manish Goregaokar
dd890d80a0
Rollup merge of #48110 - Centril:stabilize/box_leak, r=alexcrichton
Stabilize Box::leak

Stabilizes the following:
+ `Box::leak` (`box_leak`, in nightly since 2017-11-23)

cc #46179

 r? @rust-lang/libs
2018-02-24 15:52:04 -08:00
Manish Goregaokar
f2cbb764b8
Rollup merge of #48438 - mbrubeck:docs, r=TimNN
[docs] Minor wording changes to drain_filter docs

The docs currently say, "If the closure returns false, it will try again, and call the closure on the next element."  But this happens regardless of whether the closure returns true or false.
2018-02-23 10:24:56 -08:00
Corey Farwell
b1a6c8bdd3 Stabilize [T]::rotate_{left,right}
https://github.com/rust-lang/rust/issues/41891
2018-02-22 20:12:38 -05:00
Matt Brubeck
311fbc9265 [docs] Minor wording changes to drain_filter docs
The docs currently say, "If the closure returns false, it will try
again, and call the closure on the next element."  But this happens
regardless of whether the closure returns true or false.
2018-02-22 12:05:30 -08:00
Anthony Deschamps
e88fe1d519 Small grammar fix to docs for String::new(). 2018-02-22 14:21:54 -05:00
bors
1ad094d81c Auto merge of #47687 - SimonSapin:panic-impl, r=sfackler
RFC 2070 part 1: PanicInfo and Location API changes

This implements part of https://rust-lang.github.io/rfcs/2070-panic-implementation.html
Tracking issue: https://github.com/rust-lang/rust/issues/44489

* Move `std::panic::PanicInfo` and `std::panic::Location` to a new `core::panic` module. The two types and the `std` module were already `#[stable]` and stay that way, the new `core` module is `#[unstable]`.
* Add a new `PanicInfo::message(&self) -> Option<&fmt::Arguments>` method, which is `#[unstable]`.
* Implement `Display` for `PanicInfo` and `Location`
2018-02-18 06:02:35 +00:00
Sergio Benitez
22aecb9c6e Clarify contiguity of Vec's elements. 2018-02-16 17:08:08 -08:00
Jacob Kiesel
fbad3b2468
Switch to retain calling drain_filter. 2018-02-13 08:48:25 -07:00
hedgehog1024
770fdeddb4
Stabilize 'entry_and_modify' feature for BTreeMap 2018-02-12 22:19:37 +03:00
Mazdak Farrokhzad
486160335c stabilize Box::leak: remove #![feature(box_leak)] in docs 2018-02-10 01:39:22 +01:00
Mazdak Farrokhzad
467b5cfcb7 stabilize (version: 1.26.0) Box::leak, cc #46179 2018-02-10 01:26:19 +01:00