Skip to content

Rollup of 17 pull requests #53530

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 45 commits into from
Aug 21, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
3350eaf
Updated RELEASES.md for 1.29.0
Aug 3, 2018
a646c10
Update RELEASES.md
Aaronepower Aug 3, 2018
96f50f1
Update RELEASES.md
Aaronepower Aug 3, 2018
b4924bf
Update RELEASES.md
Aaronepower Aug 3, 2018
038ce65
expand the documentation on the `Unpin` trait
nivkner Aug 6, 2018
6845dc4
correct explenation on the usage of NonNull
nivkner Aug 6, 2018
9b7d710
fix link to PinBox
nivkner Aug 6, 2018
87bbd2e
fix style issues in doc comment
nivkner Aug 6, 2018
68e766a
remove general pinning information from Unpin trait
nivkner Aug 7, 2018
687cc98
add individual docs to `core::num::NonZero*`
llogiq Aug 14, 2018
e6244e5
Stabilize IP associated constants
tmccombs Aug 9, 2018
bc900f5
Mark libserialize functions as inline
BurntPizza Aug 15, 2018
e5e14d3
When closure with no arguments was expected, suggest wrapping
estebank Aug 12, 2018
cea73d6
update recently moved tests
estebank Aug 15, 2018
2075509
restore the page title after escaping out of a search
oconnor663 Aug 15, 2018
03530fa
add example for moving out of pointer
nivkner Aug 16, 2018
1540e8c
Remove inline attribute on generic functions
BurntPizza Aug 17, 2018
c37787e
Change target triple used to check for lldb in build-manifest
tromey Aug 17, 2018
6ae915b
clarify use of Unpin and pinning types
nivkner Aug 17, 2018
d52047f
Remove LinkMeta struct
bjorn3 Aug 18, 2018
99bba34
update lld submodule to include RISCV patch
danc86 Aug 19, 2018
71120ef
Fix typos found by codespell.
matthiaskrgr Aug 19, 2018
00920c0
Stabilize macro_vis_matcher
jkozlowski Aug 14, 2018
993fb93
Replace usages of ptr::offset with ptr::{add,sub}.
frewsxcv Aug 20, 2018
de35b66
Document Box::into_raw returns non-null ptr
estk Aug 18, 2018
b51723a
Rollup merge of #53030 - Aaronepower:master, r=Mark-Simulacrum
kennytm Aug 20, 2018
fa3d56a
Rollup merge of #53213 - tmccombs:stable-ipconstructors, r=KodrAus
kennytm Aug 20, 2018
ffde96c
Rollup merge of #53296 - estebank:suggest-closure, r=KodrAus
kennytm Aug 20, 2018
5bf2ad3
syntax: Optimize some literal parsing
alexcrichton Aug 20, 2018
6b597ce
Moved issue-53157.rs into src/test/ui/consts/const-eval/
Aug 20, 2018
c0636ab
Avoid some Place clones.
nnethercote Aug 21, 2018
f9e3af7
Rollup merge of #53370 - jkozlowski:stabilize-macro_vis_matcher, r=cr…
kennytm Aug 20, 2018
b21e956
Rollup merge of #53393 - BurntPizza:serialize-inlines, r=alexcrichton
kennytm Aug 20, 2018
2a0d720
Rollup merge of #53405 - oconnor663:search_esc, r=GuillaumeGomez
kennytm Aug 20, 2018
c980ba7
Rollup merge of #53452 - tromey:lldb-manifest-fix, r=alexcrichton
kennytm Aug 20, 2018
5d4a25d
Rollup merge of #53465 - bjorn3:remove_link_meta_struct, r=varkor
kennytm Aug 20, 2018
0834a1a
Rollup merge of #53492 - danc86:lld-riscv, r=alexcrichton
kennytm Aug 20, 2018
b5519db
Rollup merge of #53496 - matthiaskrgr:codespell_08_2018, r=varkor
kennytm Aug 20, 2018
4457180
Rollup merge of #53521 - alexcrichton:optimize-lit-token, r=michaelwo…
kennytm Aug 21, 2018
7896ac3
Rollup merge of #53363 - llogiq:num-individual-nonzero-docs, r=stevek…
kennytm Aug 21, 2018
fed4298
Rollup merge of #53462 - estk:doc-Box_into_raw, r=steveklabnik
kennytm Aug 21, 2018
dc8e9fb
Rollup merge of #53104 - nivkner:unpin_doc, r=RalfJung
kennytm Aug 21, 2018
9bbab65
Rollup merge of #53540 - TheDarkula:move-test, r=oli-obk
kennytm Aug 21, 2018
0dd88c9
Rollup merge of #53329 - frewsxcv:frewsxcv-ptr-add-sub, r=RalfJung
kennytm Aug 21, 2018
e3887e6
Rollup merge of #53551 - nnethercote:access_place_error_reported, r=v…
kennytm Aug 21, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 75 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,78 @@
Version 1.29.0 (2018-09-13)
==========================

Compiler
--------
- [Bumped minimum LLVM version to 5.0.][51899]
- [Added `powerpc64le-unknown-linux-musl` target.][51619]
- [Added `aarch64-unknown-hermit` and `x86_64-unknown-hermit` targets.][52861]

Libraries
---------
- [`Once::call_once` now no longer requires `Once` to be `'static`.][52239]
- [`BuildHasherDefault` now implements `PartialEq` and `Eq`.][52402]
- [`Box<CStr>`, `Box<OsStr>`, and `Box<Path>` now implement `Clone`.][51912]
- [Implemented `PartialEq<&str>` for `OsString` and `PartialEq<OsString>`
for `&str`.][51178]
- [`Cell<T>` now allows `T` to be unsized.][50494]
- [`SocketAddr` is now stable on Redox.][52656]

Stabilized APIs
---------------
- [`Arc::downcast`]
- [`Iterator::flatten`]
- [`Rc::downcast`]

Cargo
-----
- [Cargo can silently fix some bad lockfiles ][cargo/5831] You can use
`--locked` to disable this behaviour.
- [`cargo-install` will now allow you to cross compile an install
using `--target`][cargo/5614]
- [Added the `cargo-fix` subcommand to automatically move project code from
2015 edition to 2018.][cargo/5723]

Misc
----
- [`rustdoc` now has the `--cap-lints` option which demotes all lints above
the specified level to that level.][52354] For example `--cap-lints warn`
will demote `deny` and `forbid` lints to `warn`.
- [`rustc` and `rustdoc` will now have the exit code of `1` if compilation
fails, and `101` if there is a panic.][52197]

Compatibility Notes
-------------------
- [`str::{slice_unchecked, slice_unchecked_mut}` are now deprecated.][51807]
Use `str::get_unchecked(begin..end)` instead.
- [`std::env::home_dir` is now deprecated for its unintuitive behaviour.][51656]
Consider using the `home_dir` function from
https://crates.io/crates/dirs instead.
- [`rustc` will no longer silently ignore invalid data in target spec.][52330]

[52861]: https://github.com/rust-lang/rust/pull/52861/
[52656]: https://github.com/rust-lang/rust/pull/52656/
[52239]: https://github.com/rust-lang/rust/pull/52239/
[52330]: https://github.com/rust-lang/rust/pull/52330/
[52354]: https://github.com/rust-lang/rust/pull/52354/
[52402]: https://github.com/rust-lang/rust/pull/52402/
[52103]: https://github.com/rust-lang/rust/pull/52103/
[52197]: https://github.com/rust-lang/rust/pull/52197/
[51807]: https://github.com/rust-lang/rust/pull/51807/
[51899]: https://github.com/rust-lang/rust/pull/51899/
[51912]: https://github.com/rust-lang/rust/pull/51912/
[51511]: https://github.com/rust-lang/rust/pull/51511/
[51619]: https://github.com/rust-lang/rust/pull/51619/
[51656]: https://github.com/rust-lang/rust/pull/51656/
[51178]: https://github.com/rust-lang/rust/pull/51178/
[50494]: https://github.com/rust-lang/rust/pull/50494/
[cargo/5614]: https://github.com/rust-lang/cargo/pull/5614/
[cargo/5723]: https://github.com/rust-lang/cargo/pull/5723/
[cargo/5831]: https://github.com/rust-lang/cargo/pull/5831/
[`Arc::downcast`]: https://doc.rust-lang.org/std/sync/struct.Arc.html#method.downcast
[`Iterator::flatten`]: https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.flatten
[`Rc::downcast`]: https://doc.rust-lang.org/std/rc/struct.Rc.html#method.downcast


Version 1.28.0 (2018-08-02)
===========================

Expand Down
2 changes: 1 addition & 1 deletion src/ci/docker/scripts/musl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ shift

export CFLAGS="-fPIC $CFLAGS"

# FIXME: remove the patch when upate to 1.1.20
# FIXME: remove the patch when updating to 1.1.20
MUSL=musl-1.1.19

# may have been downloaded in a previous run
Expand Down
2 changes: 1 addition & 1 deletion src/doc/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ minimum. It also includes exercises!

# Use Rust

Once you've gotten familliar with the language, these resources can help you
Once you've gotten familiar with the language, these resources can help you
when you're actually using it day-to-day.

## The Standard Library
Expand Down
2 changes: 1 addition & 1 deletion src/doc/rustc/src/codegen-options/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ This option allows you to put extra data in each output filename.
This flag lets you control how many threads are used when doing
code generation.

Increasing paralellism may speed up compile times, but may also
Increasing parallelism may speed up compile times, but may also
produce slower code.

## remark
Expand Down
4 changes: 2 additions & 2 deletions src/doc/rustc/src/lints/listing/deny-by-default.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ mod m {
pub struct S(u8);

fn f() {
// this is trying to use S from the 'use' line, but becuase the `u8` is
// this is trying to use S from the 'use' line, but because the `u8` is
// not pub, it is private
::S;
}
Expand Down Expand Up @@ -103,7 +103,7 @@ This warning can always be fixed by removing the unused pattern in the

## mutable-transmutes

This lint catches transmuting from `&T` to `&mut T` becuase it is undefined
This lint catches transmuting from `&T` to `&mut T` because it is undefined
behavior. Some example code that triggers this lint:

```rust,ignore
Expand Down
2 changes: 1 addition & 1 deletion src/doc/rustdoc/src/unstable-features.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Unstable features

Rustdoc is under active developement, and like the Rust compiler, some features are only available
Rustdoc is under active development, and like the Rust compiler, some features are only available
on the nightly releases. Some of these are new and need some more testing before they're able to get
released to the world at large, and some of them are tied to features in the Rust compiler that are
themselves unstable. Several features here require a matching `#![feature(...)]` attribute to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ The tracking issue for this feature is: [#44493]

------------------------
The `infer_outlives_requirements` feature indicates that certain
outlives requirements can be infered by the compiler rather than
outlives requirements can be inferred by the compiler rather than
stating them explicitly.

For example, currently generic struct definitions that contain
references, require where-clauses of the form T: 'a. By using
this feature the outlives predicates will be infered, although
this feature the outlives predicates will be inferred, although
they may still be written explicitly.

```rust,ignore (pseudo-Rust)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ The tracking issue for this feature is: [#44493]

------------------------
The `infer_static_outlives_requirements` feature indicates that certain
`'static` outlives requirements can be infered by the compiler rather than
`'static` outlives requirements can be inferred by the compiler rather than
stating them explicitly.

Note: It is an accompanying feature to `infer_outlives_requirements`,
which must be enabled to infer outlives requirements.

For example, currently generic struct definitions that contain
references, require where-clauses of the form T: 'static. By using
this feature the outlives predicates will be infered, although
this feature the outlives predicates will be inferred, although
they may still be written explicitly.

```rust,ignore (pseudo-Rust)
Expand Down
14 changes: 0 additions & 14 deletions src/doc/unstable-book/src/language-features/macro-vis-matcher.md

This file was deleted.

1 change: 0 additions & 1 deletion src/doc/unstable-book/src/language-features/plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@ that warns about any item named `lintme`.
```rust,ignore
#![feature(plugin_registrar)]
#![feature(box_syntax, rustc_private)]
#![feature(macro_vis_matcher)]
#![feature(macro_at_most_once_rep)]

extern crate syntax;
Expand Down
2 changes: 1 addition & 1 deletion src/liballoc/alloc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ mod tests {
.unwrap_or_else(|_| handle_alloc_error(layout));

let mut i = ptr.cast::<u8>().as_ptr();
let end = i.offset(layout.size() as isize);
let end = i.add(layout.size());
while i < end {
assert_eq!(*i, 0);
i = i.offset(1);
Expand Down
6 changes: 4 additions & 2 deletions src/liballoc/boxed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,9 @@ impl<T: ?Sized> Box<T> {
Box(Unique::new_unchecked(raw))
}

/// Consumes the `Box`, returning the wrapped raw pointer.
/// Consumes the `Box`, returning a wrapped raw pointer.
///
/// The pointer will be properly aligned and non-null.
///
/// After calling this function, the caller is responsible for the
/// memory previously managed by the `Box`. In particular, the
Expand Down Expand Up @@ -704,7 +706,7 @@ impl<T: Clone> Clone for Box<[T]> {
impl<T> Drop for BoxBuilder<T> {
fn drop(&mut self) {
let mut data = self.data.ptr();
let max = unsafe { data.offset(self.len as isize) };
let max = unsafe { data.add(self.len) };

while data != max {
unsafe {
Expand Down
48 changes: 24 additions & 24 deletions src/liballoc/collections/btree/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1151,12 +1151,12 @@ impl<'a, K, V> Handle<NodeRef<marker::Mut<'a>, K, V, marker::Leaf>, marker::KV>
let new_len = self.node.len() - self.idx - 1;

ptr::copy_nonoverlapping(
self.node.keys().as_ptr().offset(self.idx as isize + 1),
self.node.keys().as_ptr().add(self.idx + 1),
new_node.keys.as_mut_ptr(),
new_len
);
ptr::copy_nonoverlapping(
self.node.vals().as_ptr().offset(self.idx as isize + 1),
self.node.vals().as_ptr().add(self.idx + 1),
new_node.vals.as_mut_ptr(),
new_len
);
Expand Down Expand Up @@ -1209,17 +1209,17 @@ impl<'a, K, V> Handle<NodeRef<marker::Mut<'a>, K, V, marker::Internal>, marker::
let new_len = self.node.len() - self.idx - 1;

ptr::copy_nonoverlapping(
self.node.keys().as_ptr().offset(self.idx as isize + 1),
self.node.keys().as_ptr().add(self.idx + 1),
new_node.data.keys.as_mut_ptr(),
new_len
);
ptr::copy_nonoverlapping(
self.node.vals().as_ptr().offset(self.idx as isize + 1),
self.node.vals().as_ptr().add(self.idx + 1),
new_node.data.vals.as_mut_ptr(),
new_len
);
ptr::copy_nonoverlapping(
self.node.as_internal().edges.as_ptr().offset(self.idx as isize + 1),
self.node.as_internal().edges.as_ptr().add(self.idx + 1),
new_node.edges.as_mut_ptr(),
new_len + 1
);
Expand Down Expand Up @@ -1283,14 +1283,14 @@ impl<'a, K, V> Handle<NodeRef<marker::Mut<'a>, K, V, marker::Internal>, marker::
slice_remove(self.node.keys_mut(), self.idx));
ptr::copy_nonoverlapping(
right_node.keys().as_ptr(),
left_node.keys_mut().as_mut_ptr().offset(left_len as isize + 1),
left_node.keys_mut().as_mut_ptr().add(left_len + 1),
right_len
);
ptr::write(left_node.vals_mut().get_unchecked_mut(left_len),
slice_remove(self.node.vals_mut(), self.idx));
ptr::copy_nonoverlapping(
right_node.vals().as_ptr(),
left_node.vals_mut().as_mut_ptr().offset(left_len as isize + 1),
left_node.vals_mut().as_mut_ptr().add(left_len + 1),
right_len
);

Expand All @@ -1309,7 +1309,7 @@ impl<'a, K, V> Handle<NodeRef<marker::Mut<'a>, K, V, marker::Internal>, marker::
.as_internal_mut()
.edges
.as_mut_ptr()
.offset(left_len as isize + 1),
.add(left_len + 1),
right_len + 1
);

Expand Down Expand Up @@ -1394,10 +1394,10 @@ impl<'a, K, V> Handle<NodeRef<marker::Mut<'a>, K, V, marker::Internal>, marker::

// Make room for stolen elements in the right child.
ptr::copy(right_kv.0,
right_kv.0.offset(count as isize),
right_kv.0.add(count),
right_len);
ptr::copy(right_kv.1,
right_kv.1.offset(count as isize),
right_kv.1.add(count),
right_len);

// Move elements from the left child to the right one.
Expand All @@ -1418,7 +1418,7 @@ impl<'a, K, V> Handle<NodeRef<marker::Mut<'a>, K, V, marker::Internal>, marker::
// Make room for stolen edges.
let right_edges = right.reborrow_mut().as_internal_mut().edges.as_mut_ptr();
ptr::copy(right_edges,
right_edges.offset(count as isize),
right_edges.add(count),
right_len + 1);
right.correct_childrens_parent_links(count, count + right_len + 1);

Expand Down Expand Up @@ -1463,10 +1463,10 @@ impl<'a, K, V> Handle<NodeRef<marker::Mut<'a>, K, V, marker::Internal>, marker::
move_kv(right_kv, count - 1, parent_kv, 0, 1);

// Fix right indexing
ptr::copy(right_kv.0.offset(count as isize),
ptr::copy(right_kv.0.add(count),
right_kv.0,
new_right_len);
ptr::copy(right_kv.1.offset(count as isize),
ptr::copy(right_kv.1.add(count),
right_kv.1,
new_right_len);
}
Expand All @@ -1480,7 +1480,7 @@ impl<'a, K, V> Handle<NodeRef<marker::Mut<'a>, K, V, marker::Internal>, marker::

// Fix right indexing.
let right_edges = right.reborrow_mut().as_internal_mut().edges.as_mut_ptr();
ptr::copy(right_edges.offset(count as isize),
ptr::copy(right_edges.add(count),
right_edges,
new_right_len + 1);
right.correct_childrens_parent_links(0, new_right_len + 1);
Expand All @@ -1497,11 +1497,11 @@ unsafe fn move_kv<K, V>(
dest: (*mut K, *mut V), dest_offset: usize,
count: usize)
{
ptr::copy_nonoverlapping(source.0.offset(source_offset as isize),
dest.0.offset(dest_offset as isize),
ptr::copy_nonoverlapping(source.0.add(source_offset),
dest.0.add(dest_offset),
count);
ptr::copy_nonoverlapping(source.1.offset(source_offset as isize),
dest.1.offset(dest_offset as isize),
ptr::copy_nonoverlapping(source.1.add(source_offset),
dest.1.add(dest_offset),
count);
}

Expand All @@ -1513,8 +1513,8 @@ unsafe fn move_edges<K, V>(
{
let source_ptr = source.as_internal_mut().edges.as_mut_ptr();
let dest_ptr = dest.as_internal_mut().edges.as_mut_ptr();
ptr::copy_nonoverlapping(source_ptr.offset(source_offset as isize),
dest_ptr.offset(dest_offset as isize),
ptr::copy_nonoverlapping(source_ptr.add(source_offset),
dest_ptr.add(dest_offset),
count);
dest.correct_childrens_parent_links(dest_offset, dest_offset + count);
}
Expand Down Expand Up @@ -1604,8 +1604,8 @@ pub mod marker {

unsafe fn slice_insert<T>(slice: &mut [T], idx: usize, val: T) {
ptr::copy(
slice.as_ptr().offset(idx as isize),
slice.as_mut_ptr().offset(idx as isize + 1),
slice.as_ptr().add(idx),
slice.as_mut_ptr().add(idx + 1),
slice.len() - idx
);
ptr::write(slice.get_unchecked_mut(idx), val);
Expand All @@ -1614,8 +1614,8 @@ unsafe fn slice_insert<T>(slice: &mut [T], idx: usize, val: T) {
unsafe fn slice_remove<T>(slice: &mut [T], idx: usize) -> T {
let ret = ptr::read(slice.get_unchecked(idx));
ptr::copy(
slice.as_ptr().offset(idx as isize + 1),
slice.as_mut_ptr().offset(idx as isize),
slice.as_ptr().add(idx + 1),
slice.as_mut_ptr().add(idx),
slice.len() - idx - 1
);
ret
Expand Down
Loading