Skip to content

Commit

Permalink
Auto merge of #49264 - kennytm:rollup, r=kennytm
Browse files Browse the repository at this point in the history
Rollup of 23 pull requests

- Successful merges: #48374, #48596, #48759, #48939, #49029, #49069, #49093, #49109, #49117, #49140, #49158, #49188, #49189, #49209, #49211, #49216, #49225, #49231, #49234, #49242, #49244, #49105, #49038
- Failed merges:
  • Loading branch information
bors committed Mar 22, 2018
2 parents b176285 + 2c6f911 commit 5092c6b
Show file tree
Hide file tree
Showing 68 changed files with 1,548 additions and 1,138 deletions.
8 changes: 0 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,6 @@ before_deploy:

deploy:
- provider: s3
edge:
branch: s3-eager-autoload
bucket: rust-lang-ci2
skip_cleanup: true
local_dir: deploy
Expand All @@ -336,8 +334,6 @@ deploy:
# this is the same as the above deployment provider except that it uploads to
# a slightly different directory and has a different trigger
- provider: s3
edge:
branch: s3-eager-autoload
bucket: rust-lang-ci2
skip_cleanup: true
local_dir: deploy
Expand All @@ -355,8 +351,6 @@ deploy:
# try branch. Travis does not appear to provide a way to use "or" in these
# conditions.
- provider: s3
edge:
branch: s3-eager-autoload
bucket: rust-lang-ci2
skip_cleanup: true
local_dir: deploy
Expand All @@ -371,8 +365,6 @@ deploy:
condition: $DEPLOY = 1

- provider: s3
edge:
branch: s3-eager-autoload
bucket: rust-lang-ci2
skip_cleanup: true
local_dir: deploy
Expand Down
100 changes: 100 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,103 @@
Version 1.25.0 (2018-03-29)
==========================

Language
--------
- [Stabilised `#[repr(align(x))]`.][47006] [RFC 1358]
- [You can now use nested groups of imports.][47948]
e.g. `use std::{fs::File, io::Read, path::{Path, PathBuf}};`
- [You can now have `|` at the start of a match arm.][47947] e.g.
```rust
enum Foo { A, B, C }

fn main() {
let x = Foo::A;
match x {
| Foo::A
| Foo::B => println!("AB"),
| Foo::C => println!("C"),
}
}
```

Compiler
--------
- [Upgraded to LLVM 6.][47828]
- [Added `-C lto=val` option.][47521]
- [Added `i586-unknown-linux-musl` target][47282]

Libraries
---------
- [Impl Send for `process::Command` on Unix.][47760]
- [Impl PartialEq and Eq for `ParseCharError`.][47790]
- [`UnsafeCell::into_inner` is now safe.][47204]
- [Implement libstd for CloudABI.][47268]
- [`Float::{from_bits, to_bits}` is now available in libcore.][46931]
- [Implement `AsRef<Path>` for Component][46985]
- [Implemented `Write` for `Cursor<&mut Vec<T>>`][46830]
- [Moved `Duration` to libcore.][46666]

Stabilized APIs
---------------
- [`Location::column`]
- [`ptr::NonNull`]

The following functions can now be used in a constant expression.
eg. `static MINUTE: Duration = Duration::from_secs(60);`
- [`Duration::new`][47300]
- [`Duration::from_secs`][47300]
- [`Duration::from_millis`][47300]
- [`Duration::from_micros`][47300]
- [`Duration::from_nanos`][47300]

Cargo
-----
- [`cargo new` no longer removes `rust` or `rs` prefixs/suffixs.][cargo/5013]
- [`cargo new` now defaults to creating a binary crate, instead of a
library crate.][cargo/5029]

Misc
----
- [Rust by example is now shipped with new releases][46196]

Compatibility Notes
-------------------
- [Deprecated `net::lookup_host`.][47510]
- [`rustdoc` has switched to pulldown as the default markdown renderer.][47398]
- The borrow checker was sometimes incorrectly permitting overlapping borrows
around indexing operations (see [#47349][47349]). This has been fixed (which also
enabled some correct code that used to cause errors (e.g. [#33903][33903] and [#46095][46095]).
- [Removed deprecated unstable attribute `#[simd]`.][47251]

[33903]: https://github.com/rust-lang/rust/pull/33903
[47947]: https://github.com/rust-lang/rust/pull/47947
[47948]: https://github.com/rust-lang/rust/pull/47948
[47760]: https://github.com/rust-lang/rust/pull/47760
[47790]: https://github.com/rust-lang/rust/pull/47790
[47828]: https://github.com/rust-lang/rust/pull/47828
[47398]: https://github.com/rust-lang/rust/pull/47398
[47510]: https://github.com/rust-lang/rust/pull/47510
[47521]: https://github.com/rust-lang/rust/pull/47521
[47204]: https://github.com/rust-lang/rust/pull/47204
[47251]: https://github.com/rust-lang/rust/pull/47251
[47268]: https://github.com/rust-lang/rust/pull/47268
[47282]: https://github.com/rust-lang/rust/pull/47282
[47300]: https://github.com/rust-lang/rust/pull/47300
[47349]: https://github.com/rust-lang/rust/pull/47349
[46931]: https://github.com/rust-lang/rust/pull/46931
[46985]: https://github.com/rust-lang/rust/pull/46985
[47006]: https://github.com/rust-lang/rust/pull/47006
[46830]: https://github.com/rust-lang/rust/pull/46830
[46095]: https://github.com/rust-lang/rust/pull/46095
[46666]: https://github.com/rust-lang/rust/pull/46666
[46196]: https://github.com/rust-lang/rust/pull/46196
[cargo/5013]: https://github.com/rust-lang/cargo/pull/5013
[cargo/5029]: https://github.com/rust-lang/cargo/pull/5029
[RFC 1358]: https://github.com/rust-lang/rfcs/pull/1358
[`Location::column`]: https://doc.rust-lang.org/std/panic/struct.Location.html#method.column
[`ptr::NonNull`]: https://doc.rust-lang.org/std/ptr/struct.NonNull.html


Version 1.24.0 (2018-02-15)
==========================

Expand Down
6 changes: 4 additions & 2 deletions src/bootstrap/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -310,12 +310,14 @@ impl<'a> Builder<'a> {
test::UiFullDeps, test::RunPassFullDeps, test::RunFailFullDeps,
test::CompileFailFullDeps, test::IncrementalFullDeps, test::Rustdoc, test::Pretty,
test::RunPassPretty, test::RunFailPretty, test::RunPassValgrindPretty,
test::RunPassFullDepsPretty, test::RunFailFullDepsPretty, test::RunMake,
test::RunPassFullDepsPretty, test::RunFailFullDepsPretty,
test::Crate, test::CrateLibrustc, test::CrateRustdoc, test::Linkcheck,
test::Cargotest, test::Cargo, test::Rls, test::ErrorIndex, test::Distcheck,
test::Nomicon, test::Reference, test::RustdocBook, test::RustByExample,
test::TheBook, test::UnstableBook,
test::Rustfmt, test::Miri, test::Clippy, test::RustdocJS, test::RustdocTheme),
test::Rustfmt, test::Miri, test::Clippy, test::RustdocJS, test::RustdocTheme,
// Run run-make last, since these won't pass without make on Windows
test::RunMake),
Kind::Bench => describe!(test::Crate, test::CrateLibrustc),
Kind::Doc => describe!(doc::UnstableBook, doc::UnstableBookGen, doc::TheBook,
doc::Standalone, doc::Std, doc::Test, doc::Rustc, doc::ErrorIndex, doc::Nomicon,
Expand Down
72 changes: 29 additions & 43 deletions src/ci/init_repo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ ci_dir=$(cd $(dirname $0) && pwd)
. "$ci_dir/shared.sh"

travis_fold start init_repo
travis_time_start

REPO_DIR="$1"
CACHE_DIR="$2"
Expand All @@ -42,54 +43,39 @@ if grep -q RUST_RELEASE_CHANNEL=beta src/ci/run.sh; then
git fetch origin --unshallow beta master
fi

travis_fold start update_cache
travis_time_start

# Update the cache (a pristine copy of the rust source master)
retry sh -c "rm -rf $cache_src_dir && mkdir -p $cache_src_dir && \
git clone --depth 1 https://github.com/rust-lang/rust.git $cache_src_dir"
if [ -d $cache_src_dir/src/llvm ]; then
(cd $cache_src_dir && git rm src/llvm)
fi
if [ -d $cache_src_dir/src/llvm-emscripten ]; then
(cd $cache_src_dir && git rm src/llvm-emscripten)
fi
retry sh -c "cd $cache_src_dir && \
git submodule deinit -f . && git submodule sync && git submodule update --init"

travis_fold end update_cache
travis_time_finish
function fetch_submodule {
local module=$1
local cached="download-${module//\//-}.tar.gz"
retry sh -c "rm -f $cached && \
curl -sSL -o $cached $2"
mkdir $module
touch "$module/.git"
tar -C $module --strip-components=1 -xf $cached
rm $cached
}

travis_fold start update_submodules
travis_time_start

# Update the submodules of the repo we're in, using the pristine repo as
# a cache for any object files
# No, `git submodule foreach` won't work:
# http://stackoverflow.com/questions/12641469/list-submodules-in-a-git-repository
included="src/llvm src/llvm-emscripten src/doc/book src/doc/rust-by-example"
modules="$(git config --file .gitmodules --get-regexp '\.path$' | cut -d' ' -f2)"
for module in $modules; do
if [ "$module" = src/llvm ] || [ "$module" = src/llvm-emscripten ]; then
modules=($modules)
use_git=""
urls="$(git config --file .gitmodules --get-regexp '\.url$' | cut -d' ' -f2)"
urls=($urls)
for i in ${!modules[@]}; do
module=${modules[$i]}
if [[ " $included " = *" $module "* ]]; then
commit="$(git ls-tree HEAD $module | awk '{print $3}')"
git rm $module
retry sh -c "rm -f $commit.tar.gz && \
curl -sSL -O https://github.com/rust-lang/llvm/archive/$commit.tar.gz"
tar -C src/ -xf "$commit.tar.gz"
rm "$commit.tar.gz"
mv "src/llvm-$commit" $module
continue
fi
if [ ! -e "$cache_src_dir/$module/.git" ]; then
echo "WARNING: $module not found in pristine repo"
retry sh -c "git submodule deinit -f $module && \
git submodule update --init --recursive $module"
url=${urls[$i]}
url=${url/\.git/}
fetch_submodule $module "$url/archive/$commit.tar.gz" &
continue
else
use_git="$use_git $module"
fi
retry sh -c "git submodule deinit -f $module && \
git submodule update --init --recursive --reference $cache_src_dir/$module $module"
done

travis_fold end update_submodules
travis_time_finish

retry sh -c "git submodule deinit -f $use_git && \
git submodule sync && \
git submodule update -j 16 --init --recursive $use_git"
wait
travis_fold end init_repo
travis_time_finish
10 changes: 1 addition & 9 deletions src/ci/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,15 +107,7 @@ fi
travis_fold end log-system-info

if [ ! -z "$SCRIPT" ]; then
# FIXME(#49246): Re-enable these tools after #49246 has been merged and thus fixing the cache.
if [ "$DEPLOY_ALT" = 1 ]; then
sh -x -c "$SCRIPT \
--exclude src/tools/rls \
--exclude src/tools/rustfmt \
--exclude src/tools/clippy"
else
sh -x -c "$SCRIPT"
fi
sh -x -c "$SCRIPT"
else
do_make() {
travis_fold start "make-$1"
Expand Down
2 changes: 1 addition & 1 deletion src/liballoc/tests/slice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1351,7 +1351,7 @@ fn test_copy_from_slice_dst_shorter() {
const MAX_LEN: usize = 80;

static DROP_COUNTS: [AtomicUsize; MAX_LEN] = [
// FIXME #5244: AtomicUsize is not Copy.
// FIXME(RFC 1109): AtomicUsize is not Copy.
AtomicUsize::new(0), AtomicUsize::new(0), AtomicUsize::new(0), AtomicUsize::new(0),
AtomicUsize::new(0), AtomicUsize::new(0), AtomicUsize::new(0), AtomicUsize::new(0),
AtomicUsize::new(0), AtomicUsize::new(0), AtomicUsize::new(0), AtomicUsize::new(0),
Expand Down
25 changes: 3 additions & 22 deletions src/libcore/convert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,25 +48,6 @@

#![stable(feature = "rust1", since = "1.0.0")]

use fmt;

/// A type used as the error type for implementations of fallible conversion
/// traits in cases where conversions cannot actually fail.
///
/// Because `Infallible` has no variants, a value of this type can never exist.
/// It is used only to satisfy trait signatures that expect an error type, and
/// signals to both the compiler and the user that the error case is impossible.
#[unstable(feature = "try_from", issue = "33417")]
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub enum Infallible {}

#[unstable(feature = "try_from", issue = "33417")]
impl fmt::Display for Infallible {
fn fmt(&self, _: &mut fmt::Formatter) -> fmt::Result {
match *self {
}
}
}
/// A cheap reference-to-reference conversion. Used to convert a value to a
/// reference value within generic code.
///
Expand Down Expand Up @@ -382,7 +363,7 @@ impl<'a, T: ?Sized, U: ?Sized> AsRef<U> for &'a mut T where T: AsRef<U>
}
}

// FIXME (#23442): replace the above impls for &/&mut with the following more general one:
// FIXME (#45742): replace the above impls for &/&mut with the following more general one:
// // As lifts over Deref
// impl<D: ?Sized + Deref, U: ?Sized> AsRef<U> for D where D::Target: AsRef<U> {
// fn as_ref(&self) -> &U {
Expand All @@ -399,7 +380,7 @@ impl<'a, T: ?Sized, U: ?Sized> AsMut<U> for &'a mut T where T: AsMut<U>
}
}

// FIXME (#23442): replace the above impl for &mut with the following more general one:
// FIXME (#45742): replace the above impl for &mut with the following more general one:
// // AsMut lifts over DerefMut
// impl<D: ?Sized + Deref, U: ?Sized> AsMut<U> for D where D::Target: AsMut<U> {
// fn as_mut(&mut self) -> &mut U {
Expand Down Expand Up @@ -438,7 +419,7 @@ impl<T, U> TryInto<U> for T where U: TryFrom<T>
// with an uninhabited error type.
#[unstable(feature = "try_from", issue = "33417")]
impl<T, U> TryFrom<U> for T where T: From<U> {
type Error = Infallible;
type Error = !;

fn try_from(value: U) -> Result<Self, Self::Error> {
Ok(T::from(value))
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/iter/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1872,7 +1872,7 @@ impl<I: Iterator> Iterator for Peekable<I> {

#[inline]
fn nth(&mut self, n: usize) -> Option<I::Item> {
// FIXME(#6393): merge these when borrow-checking gets better.
// FIXME(#43234): merge these when borrow-checking gets better.
if n == 0 {
match self.peeked.take() {
Some(v) => v,
Expand Down
17 changes: 8 additions & 9 deletions src/libcore/num/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

#![stable(feature = "rust1", since = "1.0.0")]

use convert::{Infallible, TryFrom};
use convert::TryFrom;
use fmt;
use intrinsics;
use ops;
Expand Down Expand Up @@ -3596,10 +3596,9 @@ impl fmt::Display for TryFromIntError {
}

#[unstable(feature = "try_from", issue = "33417")]
impl From<Infallible> for TryFromIntError {
fn from(infallible: Infallible) -> TryFromIntError {
match infallible {
}
impl From<!> for TryFromIntError {
fn from(never: !) -> TryFromIntError {
never
}
}

Expand All @@ -3608,7 +3607,7 @@ macro_rules! try_from_unbounded {
($source:ty, $($target:ty),*) => {$(
#[unstable(feature = "try_from", issue = "33417")]
impl TryFrom<$source> for $target {
type Error = Infallible;
type Error = !;

#[inline]
fn try_from(value: $source) -> Result<Self, Self::Error> {
Expand Down Expand Up @@ -3719,7 +3718,7 @@ try_from_lower_bounded!(isize, usize);
#[cfg(target_pointer_width = "16")]
mod ptr_try_from_impls {
use super::TryFromIntError;
use convert::{Infallible, TryFrom};
use convert::TryFrom;

try_from_upper_bounded!(usize, u8);
try_from_unbounded!(usize, u16, u32, u64, u128);
Expand All @@ -3745,7 +3744,7 @@ mod ptr_try_from_impls {
#[cfg(target_pointer_width = "32")]
mod ptr_try_from_impls {
use super::TryFromIntError;
use convert::{Infallible, TryFrom};
use convert::TryFrom;

try_from_upper_bounded!(usize, u8, u16);
try_from_unbounded!(usize, u32, u64, u128);
Expand All @@ -3771,7 +3770,7 @@ mod ptr_try_from_impls {
#[cfg(target_pointer_width = "64")]
mod ptr_try_from_impls {
use super::TryFromIntError;
use convert::{Infallible, TryFrom};
use convert::TryFrom;

try_from_upper_bounded!(usize, u8, u16, u32);
try_from_unbounded!(usize, u64, u128);
Expand Down
Loading

0 comments on commit 5092c6b

Please sign in to comment.