1428 Commits

Author SHA1 Message Date
Niv Kaminer
6b47a6105c allow unused mut for pinning explanation 2018-08-23 02:13:01 +03:00
Niv Kaminer
8e9aad268e deemphasize immutability and improve swap explanation in pin module 2018-08-23 01:37:03 +03:00
Niv Kaminer
1bb05797c2 expand the documentation on PinBox 2018-08-23 01:37:03 +03:00
Niv Kaminer
f9efd0578a move pin module to liballoc and reexport that 2018-08-23 01:37:03 +03:00
Niv Kaminer
c4ec0cd369 attempt to work around Box<T> not being recognized as local type 2018-08-23 01:37:03 +03:00
Niv Kaminer
30bb4af5d8 add top-level documentation to the std pin module 2018-08-23 01:37:03 +03:00
Niv Kaminer
971d7ed249 move PinBox into pin module and export through std 2018-08-23 01:37:03 +03:00
Niv Kaminer
13da951868 move PinMut into pin module and export through std 2018-08-23 01:37:03 +03:00
MaloJaffre
f8d5ed47e5 Add a test for issue #53529 2018-08-22 13:15:50 +02:00
MaloJaffre
b85e4cc8fa Fix unsoundness in VecDeque Debug impls
Fixes #53566.
2018-08-22 13:15:50 +02:00
MaloJaffre
241b9b45c0 Revert "Auto merge of #52553 - Pazzaz:vecdeque-append, r=SimonSapin"
This partially reverts commit d5b6b95aef94169b5dbe4dbb1357d4bab1fc9800,
reversing changes made to 6b1ff19af36f7bbf1974579ec1b9bf2c8ccd595e.

Fixes #53529.
Cc: #53564.
2018-08-22 10:27:42 +02:00
Matthias Krüger
11f3918ca2 docs: std::string::String.repeat(): slightly rephrase to be more in-line with other descriptions.
add ticks around a few keywords in other descriptions.
2018-08-22 08:35:34 +02:00
bors
9f9f2c0095 Auto merge of #53530 - kennytm:rollup, r=kennytm
Rollup of 17 pull requests

Successful merges:

 - #53030 (Updated RELEASES.md for 1.29.0)
 - #53104 (expand the documentation on the `Unpin` trait)
 - #53213 (Stabilize IP associated constants)
 - #53296 (When closure with no arguments was expected, suggest wrapping)
 - #53329 (Replace usages of ptr::offset with ptr::{add,sub}.)
 - #53363 (add individual docs to `core::num::NonZero*`)
 - #53370 (Stabilize macro_vis_matcher)
 - #53393 (Mark libserialize functions as inline)
 - #53405 (restore the page title after escaping out of a search)
 - #53452 (Change target triple used to check for lldb in build-manifest)
 - #53462 (Document Box::into_raw returns non-null ptr)
 - #53465 (Remove LinkMeta struct)
 - #53492 (update lld submodule to include RISCV patch)
 - #53496 (Fix typos found by codespell.)
 - #53521 (syntax: Optimize some literal parsing)
 - #53540 (Moved issue-53157.rs into src/test/ui/consts/const-eval/)
 - #53551 (Avoid some Place clones.)

Failed merges:

r? @ghost
2018-08-21 16:04:11 +00:00
kennytm
0dd88c9797
Rollup merge of #53329 - frewsxcv:frewsxcv-ptr-add-sub, r=RalfJung
Replace usages of ptr::offset with ptr::{add,sub}.

Rust provides these helper methods – so let's use them!
2018-08-21 22:05:30 +08:00
kennytm
fed4298aed
Rollup merge of #53462 - estk:doc-Box_into_raw, r=steveklabnik
Document Box::into_raw returns non-null ptr

Closes  #52806.
2018-08-21 17:51:59 +08:00
bors
70c33bb8e2 Auto merge of #53080 - hermord:rc-opt, r=alexcrichton
Change `Rc::inc_{weak,strong}` to better hint optimization to LLVM

As discussed in #13018, `Rc::inc_strong` and `Rc::inc_weak` are changed to allow compositions of `clone` and `drop` to be better optimized. Almost entirely as in [this comment](https://github.com/rust-lang/rust/issues/13018#issuecomment-408642184), except that `abort` on zero is added so that a `drop(t.clone())` does not produce a zero check followed by conditional deallocation.

This is different from #21418 in that it doesn't rely on `assume`, avoiding the prohibitive compilation slowdown.

[Before and after IR](https://gist.github.com/hermord/266e55451b7fe0bb8caa6e35d17c86e1).
2018-08-21 06:40:20 +00:00
Evan Simmons
de35b66783 Document Box::into_raw returns non-null ptr 2018-08-20 10:56:16 -06:00
Corey Farwell
993fb93464 Replace usages of ptr::offset with ptr::{add,sub}. 2018-08-20 07:28:34 -04:00
varkor
ff79670569 Remove old tests 2018-08-19 22:36:59 +01:00
Matthias Krüger
71120ef1e5 Fix typos found by codespell. 2018-08-19 17:41:28 +02: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
Roman Proskuryakov
5bfb785078 Review fix 2018-08-15 22:06:35 +03:00
Pazzaz
b063bd4616 Test VecDeque append not dropping twice 2018-08-15 19:42:07 +02:00
Pazzaz
76625280b2 Clarify unused_as_mut_slices 2018-08-15 18:01:42 +02:00
Roman Proskuryakov
9a3a12eaa3 Fix review notes 2018-08-15 14:00:59 +03:00
Corey Farwell
d1193bf95e Add doc examples for std::alloc::{alloc,alloc_zeroed}. 2018-08-14 21:32:11 -04:00
Pazzaz
ae0f254311 Clarify dst condition 2018-08-14 20:56:22 +02:00
Pazzaz
8d3554c48d Don't drop values in other, just move the tail 2018-08-14 20:54:25 +02:00
Corey Farwell
ec18991492 Add links to std::char::REPLACEMENT_CHARACTER from docs.
There are a few places where we mention the replacement character in the
docs, and it could be helpful for users to utilize the constant which is
available in the standard library, so let’s link to it!
2018-08-11 15:42:35 -04:00
Pazzaz
894c9ca1a7 Add benchmark for VecDeque append 2018-08-10 21:52:00 +02:00
memoryruins
ce7f0c483d liballoc: enable feature(nll) for bootstrap 2018-08-09 01:50:49 -04:00
kennytm
3385cae74a
Rollup merge of #53068 - MajorBreakfast:spawn, r=cramertj
Rename Executor trait to Spawn

Renames the `Executor` trait to `Spawn` and the method on `Context` to `spawner`.

Note: Best only merge this after we've the alpha 3 announcement post ready.

r? @cramertj
2018-08-07 16:55:42 +08:00
Roman Proskuryakov
931eb4c4d5 Add one more example for Cow that shows how to keep Cow in a struct 2018-08-06 17:33:32 +03:00
Josef Reinhard Brandl
60aa11df4c Rename Executor trait to Spawn 2018-08-06 12:18:47 +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
a00ba4d71e Correct invalid feature attributes 2018-08-05 15:54:49 +01:00
varkor
64185f205d Remove unnecessary or invalid feature attributes 2018-08-05 15:54:48 +01:00
Dmytro Shynkevych
4e17fbde0b Fixed typo 2018-08-05 02:41:14 -04:00
Dmytro Shynkevych
1553ea2316 Changed Rc::inc_{weak,strong} to better hint optimization to LLVM 2018-08-04 15:41:12 -04:00
varkor
aecf8c2a62 Add trim_start, trim_end, trim_start_matches and trim_end_matches 2018-08-02 20:39:29 +01:00
bors
03da14ba8c Auto merge of #52949 - Mark-Simulacrum:snap, r=alexcrichton
Switch to bootstrapping from 1.29 beta

r? @alexcrichton
2018-08-02 15:34:21 +00:00
Mark Rousskov
683a3db01f Switch to bootstrapping from 1.29 beta 2018-08-01 11:59:08 -06:00
Laurentiu Nicola
38e311e448 Use SetLenOnDrop in Vec::truncate()
This avoids a redundant length check in some cases when calling
`Vec::truncate` or `Vec::clear`.

Fixes #51802
2018-07-31 20:53:53 +03: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
bors
4f1e235744 Auto merge of #52336 - ishitatsuyuki:dyn-rollup, r=Mark-Simulacrum
Rollup of bare_trait_objects PRs

All deny attributes were moved into bootstrap so they can be disabled with a line of config.

Warnings for external tools are allowed and it's up to the tool's maintainer to keep it warnings free.

r? @Mark-Simulacrum
cc @ljedrz @kennytm
2018-07-27 20:27:40 +00:00
Shotaro Yamada
b326e71b79 Incorporate a stray test 2018-07-27 18:07:20 +09:00
Tatsuyuki Ishi
e098985939 Deny bare_trait_objects globally 2018-07-25 10:25:29 +09:00
Tatsuyuki Ishi
66c4dc9769 Add missing dyn 2018-07-25 10:24:31 +09:00
tinaun
75d22263c9 Impl Executor for Box<E: Executor> 2018-07-24 17:09:12 -04:00