Skip to content
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

Rollup of 21 pull requests #47522

Merged
merged 59 commits into from
Jan 17, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
bdc34fd
fix faulty comment
andjo403 Jan 9, 2018
f7b4877
Report errors instead of panic!()
Rantanen Jan 12, 2018
0b56ab0
Optimize slice.{r}position result bounds check
arthurprs Jan 10, 2018
4cedbfc
fix mispositioned span
gaurikholkar Jan 13, 2018
eb1ada2
revert changes to ui test
gaurikholkar Jan 13, 2018
3c8c505
add ui test
gaurikholkar Jan 13, 2018
a22e716
Add a default directory for -Zmir-dump-dir
varkor Jan 14, 2018
2ccc82e
Make dump_mir_dir non-optional
varkor Jan 14, 2018
e2bd0e1
Update html-diff crate => fix unicode parsing and invalid paths
GuillaumeGomez Jan 14, 2018
394b95f
Fix test
varkor Jan 15, 2018
ecd47a9
Don't include bang in macro replacement suggestion
etaoins Jan 14, 2018
f9e1b9c
Add NLL test for #45045
chrisvittal Jan 15, 2018
c698496
Reexport -> re-export in documentation section headings
carols10cents Jan 12, 2018
90fcd44
Reexport -> re-export in error messages
carols10cents Jan 12, 2018
e168aa3
Reexport -> re-export in prose and documentation comments
carols10cents Jan 12, 2018
dc44d41
remove noop landing pads in cleanup shims
arielb1 Jan 15, 2018
bfde33f
Add "-lmsvcrt" twice to get rustc to build with the latest mingw64
segevfiner Jan 16, 2018
a4660df
Point at unused arguments for format string
estebank Jan 16, 2018
661e033
in which the private no-mangle lints receive a valued lesson in humility
zackmdavis Jan 16, 2018
fd075c6
implement "only-<platforms>" for test headers
Pulkit07 Jan 16, 2018
1e436eb
return the boolean value directly instead of using if-else
Pulkit07 Jan 16, 2018
567b07c
rename parse_cfg_prefix() to has_cfg_prefix()
Pulkit07 Jan 16, 2018
bd70f0f
add a comment about parsing only prefix in header.rs
Pulkit07 Jan 16, 2018
24c3a6d
Add a Docker container for doing automated builds for CloudABI.
EdSchouten Jan 14, 2018
5801f95
Move dist-cloudabi/ into disabled/.
EdSchouten Jan 14, 2018
46c20c0
Remove incorrect `Default::default` links, add a new one
goffrie Jan 16, 2018
1dcfd14
Make non-found module name optional
dominikWin Jan 16, 2018
d769539
fix tidy checks
gaurikholkar Jan 16, 2018
a4e3f36
using tabs in ui tests
gaurikholkar Jan 16, 2018
efe3d69
fix minor errors
gaurikholkar Jan 16, 2018
ae4288f
Integrate dist-cloudabi into dist-various-2.
EdSchouten Jan 16, 2018
f81c2de
Allow a trailing comma in lint_array; fix #47428
mark-i-m Jan 15, 2018
dcf0cd0
Only enable CloudABI builds for x86-64 for now.
EdSchouten Jan 16, 2018
1606341
Document the mingw -lmsvcrt hack better
segevfiner Jan 16, 2018
6defae3
rustc: Spawn `cmd /c` for `.bat` scripts
alexcrichton Jan 16, 2018
2c5542f
Update rust-installer for streaming parallelism
cuviper Jan 17, 2018
eb3da09
Add secondary span pointing at the statement (error span)
estebank Jan 17, 2018
86d6301
whitelist x86 fxsr feature
gnzlbg Jan 17, 2018
283ee54
Rollup merge of #47302 - andjo403:commentfix, r=michaelwoerister
kennytm Jan 17, 2018
175dd84
Rollup merge of #47333 - arthurprs:iter-position-bounds-check, r=dtolnay
kennytm Jan 17, 2018
29c2aa7
Rollup merge of #47387 - Rantanen:linkchecker-error-msg, r=steveklabnik
kennytm Jan 17, 2018
e7087f0
Rollup merge of #47404 - integer32llc:reexport-to-re-export, r=stevek…
kennytm Jan 17, 2018
bd8aa02
Rollup merge of #47407 - gaurikholkar:master, r=estebank
kennytm Jan 17, 2018
01749e1
Rollup merge of #47426 - varkor:default-mir-dump-dir, r=nikomatsakis
kennytm Jan 17, 2018
7e70993
Rollup merge of #47427 - EdSchouten:cloudabi-ci, r=alexcrichton
kennytm Jan 17, 2018
233f291
Rollup merge of #47436 - GuillaumeGomez:up-html-diff, r=QuietMisdreavus
kennytm Jan 17, 2018
4cb8789
Rollup merge of #47444 - etaoins:dont-include-bang-in-macro-suggestio…
kennytm Jan 17, 2018
1bf513e
Rollup merge of #47456 - chrisvittal:nll-tests, r=nikomatsakis
kennytm Jan 17, 2018
4b636d0
Rollup merge of #47458 - mark-i-m:lint_array_comma, r=estebank
kennytm Jan 17, 2018
be916ce
Rollup merge of #47467 - arielb1:cleanup-shims, r=eddyb
kennytm Jan 17, 2018
b2c5484
Rollup merge of #47479 - zackmdavis:and_the_case_of_the_suggested_dou…
kennytm Jan 17, 2018
35bf7f8
Rollup merge of #47481 - estebank:unused-args, r=arielb1
kennytm Jan 17, 2018
3501095
Rollup merge of #47483 - segevfiner:mingw64-build-hack, r=alexcrichton
kennytm Jan 17, 2018
5e1f442
Rollup merge of #47487 - Pulkit07:foo, r=kennytm
kennytm Jan 17, 2018
a588dcf
Rollup merge of #47497 - goffrie:patch-1, r=dtolnay
kennytm Jan 17, 2018
fb1f01d
Rollup merge of #47498 - dominikWin:missing-module-name, r=petrochenkov
kennytm Jan 17, 2018
54299e2
Rollup merge of #47505 - alexcrichton:fix-bat-spawn-regression, r=est…
kennytm Jan 17, 2018
8b22802
Rollup merge of #47509 - cuviper:rayon-rust-installer, r=Mark-Simulacrum
kennytm Jan 17, 2018
5fade39
Rollup merge of #47514 - gnzlbg:whitelist_x86_fxsr, r=rkruppe
kennytm Jan 17, 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
14 changes: 7 additions & 7 deletions RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ Compatibility Notes
a warning.
- [From the pound escape, lines consisting of multiple `#`s are
now visible][41785]
- [It is an error to reexport private enum variants][42460]. This is
- [It is an error to re-export private enum variants][42460]. This is
known to break a number of crates that depend on an older version of
mustache.
- [On Windows, if `VCINSTALLDIR` is set incorrectly, `rustc` will try
Expand Down Expand Up @@ -2251,10 +2251,10 @@ Rustdoc
-------

* [Fix empty implementation section on some module pages](https://github.com/rust-lang/rust/pull/34536)
* [Fix inlined renamed reexports in import lists](https://github.com/rust-lang/rust/pull/34479)
* [Fix inlined renamed re-exports in import lists](https://github.com/rust-lang/rust/pull/34479)
* [Fix search result layout for enum variants and struct fields](https://github.com/rust-lang/rust/pull/34477)
* [Fix issues with source links to external crates](https://github.com/rust-lang/rust/pull/34387)
* [Fix redirect pages for renamed reexports](https://github.com/rust-lang/rust/pull/34245)
* [Fix redirect pages for renamed re-exports](https://github.com/rust-lang/rust/pull/34245)

Tooling
-------
Expand Down Expand Up @@ -4988,7 +4988,7 @@ Version 0.10 (2014-04-03)
* std: The `vec` module has been renamed to `slice`.
* std: A new vector type, `Vec<T>`, has been added in preparation for DST.
This will become the only growable vector in the future.
* std: `std::io` now has more public-reexports. Types such as `BufferedReader`
* std: `std::io` now has more public re-exports. Types such as `BufferedReader`
are now found at `std::io::BufferedReader` instead of
`std::io::buffered::BufferedReader`.
* std: `print` and `println` are no longer in the prelude, the `print!` and
Expand Down Expand Up @@ -5079,8 +5079,8 @@ Version 0.10 (2014-04-03)
* render standalone markdown files.
* the --test flag tests all code blocks by default.
* exported macros are displayed.
* reexported types have their documentation inlined at the location of the
first reexport.
* re-exported types have their documentation inlined at the location of the
first re-export.
* search works across crates that have been rendered to the same output
directory.

Expand Down Expand Up @@ -5467,7 +5467,7 @@ Version 0.7 (2013-07-03)
incl. `any`, `all`. removed.
* std: The `finalize` method of `Drop` renamed to `drop`.
* std: The `drop` method now takes `&mut self` instead of `&self`.
* std: The prelude no longer reexports any modules, only types and traits.
* std: The prelude no longer re-exports any modules, only types and traits.
* std: Prelude additions: `print`, `println`, `FromStr`, `ApproxEq`, `Equiv`,
`Iterator`, `IteratorUtil`, many numeric traits, many tuple traits.
* std: New numeric traits: `Fractional`, `Real`, `RealExt`, `Integer`, `Ratio`,
Expand Down
13 changes: 7 additions & 6 deletions src/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 14 additions & 3 deletions src/ci/docker/dist-various-2/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:16.04
FROM ubuntu:17.10

COPY scripts/cross-apt-packages.sh /scripts/
RUN sh /scripts/cross-apt-packages.sh
Expand All @@ -21,9 +21,12 @@ RUN apt-key adv --batch --yes --keyserver keyserver.ubuntu.com --recv-keys 74DA7
RUN add-apt-repository -y 'deb http://apt.dilos.org/dilos dilos2-testing main'

WORKDIR /tmp
COPY dist-various-2/shared.sh dist-various-2/build-fuchsia-toolchain.sh /tmp/
COPY dist-various-2/build-solaris-toolchain.sh /tmp/
COPY dist-various-2/shared.sh /tmp/
COPY dist-various-2/build-cloudabi-toolchain.sh /tmp/
RUN /tmp/build-cloudabi-toolchain.sh x86_64-unknown-cloudabi
COPY dist-various-2/build-fuchsia-toolchain.sh /tmp/
RUN /tmp/build-fuchsia-toolchain.sh
COPY dist-various-2/build-solaris-toolchain.sh /tmp/
RUN /tmp/build-solaris-toolchain.sh x86_64 amd64 solaris-i386
RUN /tmp/build-solaris-toolchain.sh sparcv9 sparcv9 solaris-sparc

Expand All @@ -44,12 +47,20 @@ ENV \
CC_x86_64_sun_solaris=x86_64-sun-solaris2.10-gcc \
CXX_x86_64_sun_solaris=x86_64-sun-solaris2.10-g++

# FIXME(EdSchouten): Remove this once cc ≥1.0.4 has been merged. It can
# automatically pick the right compiler path.
ENV \
AR_x86_64_unknown_cloudabi=x86_64-unknown-cloudabi-ar \
CC_x86_64_unknown_cloudabi=x86_64-unknown-cloudabi-clang \
CXX_x86_64_unknown_cloudabi=x86_64-unknown-cloudabi-clang++

ENV TARGETS=x86_64-unknown-fuchsia
ENV TARGETS=$TARGETS,aarch64-unknown-fuchsia
ENV TARGETS=$TARGETS,sparcv9-sun-solaris
ENV TARGETS=$TARGETS,wasm32-unknown-unknown
ENV TARGETS=$TARGETS,x86_64-sun-solaris
ENV TARGETS=$TARGETS,x86_64-unknown-linux-gnux32
ENV TARGETS=$TARGETS,x86_64-unknown-cloudabi

ENV RUST_CONFIGURE_ARGS --target=$TARGETS --enable-extended
ENV SCRIPT python2.7 ../x.py dist --target $TARGETS
55 changes: 55 additions & 0 deletions src/ci/docker/dist-various-2/build-cloudabi-toolchain.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#!/bin/bash
# Copyright 2018 The Rust Project Developers. See the COPYRIGHT
# file at the top-level directory of this distribution and at
# http://rust-lang.org/COPYRIGHT.
#
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
# option. This file may not be copied, modified, or distributed
# except according to those terms.

set -eux

# Install prerequisites.
apt-get update
apt-get install -y --no-install-recommends \
apt-transport-https \
ca-certificates \
clang-5.0 \
cmake \
curl \
file \
g++ \
gdb \
git \
lld-5.0 \
make \
python \
sudo \
xz-utils

# Set up a Clang-based cross compiler toolchain.
# Based on the steps described at https://nuxi.nl/cloudabi/debian/
target=$1
for tool in ar nm objdump ranlib size; do
ln -s ../lib/llvm-5.0/bin/llvm-${tool} /usr/bin/${target}-${tool}
done
ln -s ../lib/llvm-5.0/bin/clang /usr/bin/${target}-cc
ln -s ../lib/llvm-5.0/bin/clang /usr/bin/${target}-c++
ln -s ../lib/llvm-5.0/bin/lld /usr/bin/${target}-ld
ln -s ../../${target} /usr/lib/llvm-5.0/${target}

# FIXME(EdSchouten): Remove this once cc ≥1.0.4 has been merged. It
# can make use of ${target}-cc and ${target}-c++, without incorrectly
# assuming it's MSVC.
ln -s ../lib/llvm-5.0/bin/clang /usr/bin/${target}-clang
ln -s ../lib/llvm-5.0/bin/clang /usr/bin/${target}-clang++

# Install the C++ runtime libraries from CloudABI Ports.
echo deb https://nuxi.nl/distfiles/cloudabi-ports/debian/ cloudabi cloudabi > \
/etc/apt/sources.list.d/cloudabi.list
curl 'https://pgp.mit.edu/pks/lookup?op=get&search=0x0DA51B8531344B15' | \
apt-key add -
apt-get update
apt-get install -y $(echo ${target} | sed -e s/_/-/g)-cxx-runtime
6 changes: 3 additions & 3 deletions src/doc/rustdoc/src/the-doc-attribute.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# The `#[doc]` attribute

The `#[doc]` attribute lets you control various aspects of how `rustdoc` does
its job.
its job.

The most basic function of `#[doc]` is to handle the actual documentation
text. That is, `///` is syntax sugar for `#[doc]`. This means that these two
Expand Down Expand Up @@ -143,7 +143,7 @@ pub mod bar {
}
```

The documentation will generate a "Reexports" section, and say `pub use bar::Bar;`, where
The documentation will generate a "Re-exports" section, and say `pub use bar::Bar;`, where
`Bar` is a link to its page.

If we change the `use` line like this:
Expand Down Expand Up @@ -184,7 +184,7 @@ mod bar {
}
```

Now we'll have a `Reexports` line, and `Bar` will not link to anywhere.
Now we'll have a `Re-exports` line, and `Bar` will not link to anywhere.

## `#[doc(hidden)]`

Expand Down
4 changes: 2 additions & 2 deletions src/liballoc/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
//!
//! This library, like libcore, is not intended for general usage, but rather as
//! a building block of other libraries. The types and interfaces in this
//! library are reexported through the [standard library](../std/index.html),
//! library are re-exported through the [standard library](../std/index.html),
//! and should not be used through this library.
//!
//! ## Boxed values
Expand Down Expand Up @@ -52,7 +52,7 @@
//! ## Collections
//!
//! Implementations of the most common general purpose data structures are
//! defined in this library. They are reexported through the
//! defined in this library. They are re-exported through the
//! [standard collections library](../std/collections/index.html).
//!
//! ## Heap interfaces
Expand Down
11 changes: 4 additions & 7 deletions src/libcore/option.rs
Original file line number Diff line number Diff line change
Expand Up @@ -407,9 +407,7 @@ impl<T> Option<T> {
}

/// Applies a function to the contained value (if any),
/// or returns a [`default`][] (if not).
///
/// [`default`]: ../default/trait.Default.html#tymethod.default
/// or returns the provided default (if not).
///
/// # Examples
///
Expand All @@ -430,9 +428,7 @@ impl<T> Option<T> {
}

/// Applies a function to the contained value (if any),
/// or computes a [`default`][] (if not).
///
/// [`default`]: ../default/trait.Default.html#tymethod.default
/// or computes a default (if not).
///
/// # Examples
///
Expand Down Expand Up @@ -850,7 +846,7 @@ impl<T: Default> Option<T> {
/// Returns the contained value or a default
///
/// Consumes the `self` argument then, if [`Some`], returns the contained
/// value, otherwise if [`None`], returns the default value for that
/// value, otherwise if [`None`], returns the [default value] for that
/// type.
///
/// # Examples
Expand All @@ -872,6 +868,7 @@ impl<T: Default> Option<T> {
///
/// [`Some`]: #variant.Some
/// [`None`]: #variant.None
/// [default value]: ../default/trait.Default.html#tymethod.default
/// [`parse`]: ../../std/primitive.str.html#method.parse
/// [`FromStr`]: ../../std/str/trait.FromStr.html
#[inline]
Expand Down
8 changes: 4 additions & 4 deletions src/libcore/prelude/v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,20 @@

#![stable(feature = "core_prelude", since = "1.4.0")]

// Reexported core operators
// Re-exported core operators
#[stable(feature = "core_prelude", since = "1.4.0")]
#[doc(no_inline)]
pub use marker::{Copy, Send, Sized, Sync};
#[stable(feature = "core_prelude", since = "1.4.0")]
#[doc(no_inline)]
pub use ops::{Drop, Fn, FnMut, FnOnce};

// Reexported functions
// Re-exported functions
#[stable(feature = "core_prelude", since = "1.4.0")]
#[doc(no_inline)]
pub use mem::drop;

// Reexported types and traits
// Re-exported types and traits
#[stable(feature = "core_prelude", since = "1.4.0")]
#[doc(no_inline)]
pub use clone::Clone;
Expand All @@ -55,7 +55,7 @@ pub use option::Option::{self, Some, None};
#[doc(no_inline)]
pub use result::Result::{self, Ok, Err};

// Reexported extension traits for primitive types
// Re-exported extension traits for primitive types
#[stable(feature = "core_prelude", since = "1.4.0")]
#[doc(no_inline)]
pub use slice::SliceExt;
Expand Down
39 changes: 38 additions & 1 deletion src/libcore/slice/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
// a lot of stuff defined here. Let's keep it clean.
//
// Since slices don't support inherent methods; all operations
// on them are defined on traits, which are then reexported from
// on them are defined on traits, which are then re-exported from
// the prelude for convenience. So there are a lot of traits here.
//
// The layout of this file is thus:
Expand Down Expand Up @@ -1237,6 +1237,43 @@ macro_rules! iterator {
}
accum
}

#[inline]
#[rustc_inherit_overflow_checks]
fn position<P>(&mut self, mut predicate: P) -> Option<usize> where
Self: Sized,
P: FnMut(Self::Item) -> bool,
{
// The addition might panic on overflow
let n = self.len();
self.try_fold(0, move |i, x| {
if predicate(x) { Err(i) }
else { Ok(i + 1) }
}).err()
.map(|i| {
unsafe { assume(i < n) };
i
})
}

#[inline]
fn rposition<P>(&mut self, mut predicate: P) -> Option<usize> where
P: FnMut(Self::Item) -> bool,
Self: Sized + ExactSizeIterator + DoubleEndedIterator
{
// No need for an overflow check here, because `ExactSizeIterator`
// implies that the number of elements fits into a `usize`.
let n = self.len();
self.try_rfold(n, move |i, x| {
let i = i - 1;
if predicate(x) { Err(i) }
else { Ok(i) }
}).err()
.map(|i| {
unsafe { assume(i < n) };
i
})
}
}

#[stable(feature = "rust1", since = "1.0.0")]
Expand Down
Loading