Skip to content

Commit 5092c6b

Browse files
committed
Auto merge of #49264 - kennytm:rollup, r=kennytm
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:
2 parents b176285 + 2c6f911 commit 5092c6b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+1548
-1138
lines changed

.travis.yml

-8
Original file line numberDiff line numberDiff line change
@@ -318,8 +318,6 @@ before_deploy:
318318

319319
deploy:
320320
- provider: s3
321-
edge:
322-
branch: s3-eager-autoload
323321
bucket: rust-lang-ci2
324322
skip_cleanup: true
325323
local_dir: deploy
@@ -336,8 +334,6 @@ deploy:
336334
# this is the same as the above deployment provider except that it uploads to
337335
# a slightly different directory and has a different trigger
338336
- provider: s3
339-
edge:
340-
branch: s3-eager-autoload
341337
bucket: rust-lang-ci2
342338
skip_cleanup: true
343339
local_dir: deploy
@@ -355,8 +351,6 @@ deploy:
355351
# try branch. Travis does not appear to provide a way to use "or" in these
356352
# conditions.
357353
- provider: s3
358-
edge:
359-
branch: s3-eager-autoload
360354
bucket: rust-lang-ci2
361355
skip_cleanup: true
362356
local_dir: deploy
@@ -371,8 +365,6 @@ deploy:
371365
condition: $DEPLOY = 1
372366

373367
- provider: s3
374-
edge:
375-
branch: s3-eager-autoload
376368
bucket: rust-lang-ci2
377369
skip_cleanup: true
378370
local_dir: deploy

RELEASES.md

+100
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,103 @@
1+
Version 1.25.0 (2018-03-29)
2+
==========================
3+
4+
Language
5+
--------
6+
- [Stabilised `#[repr(align(x))]`.][47006] [RFC 1358]
7+
- [You can now use nested groups of imports.][47948]
8+
e.g. `use std::{fs::File, io::Read, path::{Path, PathBuf}};`
9+
- [You can now have `|` at the start of a match arm.][47947] e.g.
10+
```rust
11+
enum Foo { A, B, C }
12+
13+
fn main() {
14+
let x = Foo::A;
15+
match x {
16+
| Foo::A
17+
| Foo::B => println!("AB"),
18+
| Foo::C => println!("C"),
19+
}
20+
}
21+
```
22+
23+
Compiler
24+
--------
25+
- [Upgraded to LLVM 6.][47828]
26+
- [Added `-C lto=val` option.][47521]
27+
- [Added `i586-unknown-linux-musl` target][47282]
28+
29+
Libraries
30+
---------
31+
- [Impl Send for `process::Command` on Unix.][47760]
32+
- [Impl PartialEq and Eq for `ParseCharError`.][47790]
33+
- [`UnsafeCell::into_inner` is now safe.][47204]
34+
- [Implement libstd for CloudABI.][47268]
35+
- [`Float::{from_bits, to_bits}` is now available in libcore.][46931]
36+
- [Implement `AsRef<Path>` for Component][46985]
37+
- [Implemented `Write` for `Cursor<&mut Vec<T>>`][46830]
38+
- [Moved `Duration` to libcore.][46666]
39+
40+
Stabilized APIs
41+
---------------
42+
- [`Location::column`]
43+
- [`ptr::NonNull`]
44+
45+
The following functions can now be used in a constant expression.
46+
eg. `static MINUTE: Duration = Duration::from_secs(60);`
47+
- [`Duration::new`][47300]
48+
- [`Duration::from_secs`][47300]
49+
- [`Duration::from_millis`][47300]
50+
- [`Duration::from_micros`][47300]
51+
- [`Duration::from_nanos`][47300]
52+
53+
Cargo
54+
-----
55+
- [`cargo new` no longer removes `rust` or `rs` prefixs/suffixs.][cargo/5013]
56+
- [`cargo new` now defaults to creating a binary crate, instead of a
57+
library crate.][cargo/5029]
58+
59+
Misc
60+
----
61+
- [Rust by example is now shipped with new releases][46196]
62+
63+
Compatibility Notes
64+
-------------------
65+
- [Deprecated `net::lookup_host`.][47510]
66+
- [`rustdoc` has switched to pulldown as the default markdown renderer.][47398]
67+
- The borrow checker was sometimes incorrectly permitting overlapping borrows
68+
around indexing operations (see [#47349][47349]). This has been fixed (which also
69+
enabled some correct code that used to cause errors (e.g. [#33903][33903] and [#46095][46095]).
70+
- [Removed deprecated unstable attribute `#[simd]`.][47251]
71+
72+
[33903]: https://github.com/rust-lang/rust/pull/33903
73+
[47947]: https://github.com/rust-lang/rust/pull/47947
74+
[47948]: https://github.com/rust-lang/rust/pull/47948
75+
[47760]: https://github.com/rust-lang/rust/pull/47760
76+
[47790]: https://github.com/rust-lang/rust/pull/47790
77+
[47828]: https://github.com/rust-lang/rust/pull/47828
78+
[47398]: https://github.com/rust-lang/rust/pull/47398
79+
[47510]: https://github.com/rust-lang/rust/pull/47510
80+
[47521]: https://github.com/rust-lang/rust/pull/47521
81+
[47204]: https://github.com/rust-lang/rust/pull/47204
82+
[47251]: https://github.com/rust-lang/rust/pull/47251
83+
[47268]: https://github.com/rust-lang/rust/pull/47268
84+
[47282]: https://github.com/rust-lang/rust/pull/47282
85+
[47300]: https://github.com/rust-lang/rust/pull/47300
86+
[47349]: https://github.com/rust-lang/rust/pull/47349
87+
[46931]: https://github.com/rust-lang/rust/pull/46931
88+
[46985]: https://github.com/rust-lang/rust/pull/46985
89+
[47006]: https://github.com/rust-lang/rust/pull/47006
90+
[46830]: https://github.com/rust-lang/rust/pull/46830
91+
[46095]: https://github.com/rust-lang/rust/pull/46095
92+
[46666]: https://github.com/rust-lang/rust/pull/46666
93+
[46196]: https://github.com/rust-lang/rust/pull/46196
94+
[cargo/5013]: https://github.com/rust-lang/cargo/pull/5013
95+
[cargo/5029]: https://github.com/rust-lang/cargo/pull/5029
96+
[RFC 1358]: https://github.com/rust-lang/rfcs/pull/1358
97+
[`Location::column`]: https://doc.rust-lang.org/std/panic/struct.Location.html#method.column
98+
[`ptr::NonNull`]: https://doc.rust-lang.org/std/ptr/struct.NonNull.html
99+
100+
1101
Version 1.24.0 (2018-02-15)
2102
==========================
3103

src/bootstrap/builder.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -310,12 +310,14 @@ impl<'a> Builder<'a> {
310310
test::UiFullDeps, test::RunPassFullDeps, test::RunFailFullDeps,
311311
test::CompileFailFullDeps, test::IncrementalFullDeps, test::Rustdoc, test::Pretty,
312312
test::RunPassPretty, test::RunFailPretty, test::RunPassValgrindPretty,
313-
test::RunPassFullDepsPretty, test::RunFailFullDepsPretty, test::RunMake,
313+
test::RunPassFullDepsPretty, test::RunFailFullDepsPretty,
314314
test::Crate, test::CrateLibrustc, test::CrateRustdoc, test::Linkcheck,
315315
test::Cargotest, test::Cargo, test::Rls, test::ErrorIndex, test::Distcheck,
316316
test::Nomicon, test::Reference, test::RustdocBook, test::RustByExample,
317317
test::TheBook, test::UnstableBook,
318-
test::Rustfmt, test::Miri, test::Clippy, test::RustdocJS, test::RustdocTheme),
318+
test::Rustfmt, test::Miri, test::Clippy, test::RustdocJS, test::RustdocTheme,
319+
// Run run-make last, since these won't pass without make on Windows
320+
test::RunMake),
319321
Kind::Bench => describe!(test::Crate, test::CrateLibrustc),
320322
Kind::Doc => describe!(doc::UnstableBook, doc::UnstableBookGen, doc::TheBook,
321323
doc::Standalone, doc::Std, doc::Test, doc::Rustc, doc::ErrorIndex, doc::Nomicon,

src/ci/init_repo.sh

+29-43
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ ci_dir=$(cd $(dirname $0) && pwd)
1717
. "$ci_dir/shared.sh"
1818

1919
travis_fold start init_repo
20+
travis_time_start
2021

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

45-
travis_fold start update_cache
46-
travis_time_start
47-
48-
# Update the cache (a pristine copy of the rust source master)
49-
retry sh -c "rm -rf $cache_src_dir && mkdir -p $cache_src_dir && \
50-
git clone --depth 1 https://github.com/rust-lang/rust.git $cache_src_dir"
51-
if [ -d $cache_src_dir/src/llvm ]; then
52-
(cd $cache_src_dir && git rm src/llvm)
53-
fi
54-
if [ -d $cache_src_dir/src/llvm-emscripten ]; then
55-
(cd $cache_src_dir && git rm src/llvm-emscripten)
56-
fi
57-
retry sh -c "cd $cache_src_dir && \
58-
git submodule deinit -f . && git submodule sync && git submodule update --init"
59-
60-
travis_fold end update_cache
61-
travis_time_finish
46+
function fetch_submodule {
47+
local module=$1
48+
local cached="download-${module//\//-}.tar.gz"
49+
retry sh -c "rm -f $cached && \
50+
curl -sSL -o $cached $2"
51+
mkdir $module
52+
touch "$module/.git"
53+
tar -C $module --strip-components=1 -xf $cached
54+
rm $cached
55+
}
6256

63-
travis_fold start update_submodules
64-
travis_time_start
65-
66-
# Update the submodules of the repo we're in, using the pristine repo as
67-
# a cache for any object files
68-
# No, `git submodule foreach` won't work:
69-
# http://stackoverflow.com/questions/12641469/list-submodules-in-a-git-repository
57+
included="src/llvm src/llvm-emscripten src/doc/book src/doc/rust-by-example"
7058
modules="$(git config --file .gitmodules --get-regexp '\.path$' | cut -d' ' -f2)"
71-
for module in $modules; do
72-
if [ "$module" = src/llvm ] || [ "$module" = src/llvm-emscripten ]; then
59+
modules=($modules)
60+
use_git=""
61+
urls="$(git config --file .gitmodules --get-regexp '\.url$' | cut -d' ' -f2)"
62+
urls=($urls)
63+
for i in ${!modules[@]}; do
64+
module=${modules[$i]}
65+
if [[ " $included " = *" $module "* ]]; then
7366
commit="$(git ls-tree HEAD $module | awk '{print $3}')"
7467
git rm $module
75-
retry sh -c "rm -f $commit.tar.gz && \
76-
curl -sSL -O https://github.com/rust-lang/llvm/archive/$commit.tar.gz"
77-
tar -C src/ -xf "$commit.tar.gz"
78-
rm "$commit.tar.gz"
79-
mv "src/llvm-$commit" $module
80-
continue
81-
fi
82-
if [ ! -e "$cache_src_dir/$module/.git" ]; then
83-
echo "WARNING: $module not found in pristine repo"
84-
retry sh -c "git submodule deinit -f $module && \
85-
git submodule update --init --recursive $module"
68+
url=${urls[$i]}
69+
url=${url/\.git/}
70+
fetch_submodule $module "$url/archive/$commit.tar.gz" &
8671
continue
72+
else
73+
use_git="$use_git $module"
8774
fi
88-
retry sh -c "git submodule deinit -f $module && \
89-
git submodule update --init --recursive --reference $cache_src_dir/$module $module"
9075
done
91-
92-
travis_fold end update_submodules
93-
travis_time_finish
94-
76+
retry sh -c "git submodule deinit -f $use_git && \
77+
git submodule sync && \
78+
git submodule update -j 16 --init --recursive $use_git"
79+
wait
9580
travis_fold end init_repo
81+
travis_time_finish

src/ci/run.sh

+1-9
Original file line numberDiff line numberDiff line change
@@ -107,15 +107,7 @@ fi
107107
travis_fold end log-system-info
108108

109109
if [ ! -z "$SCRIPT" ]; then
110-
# FIXME(#49246): Re-enable these tools after #49246 has been merged and thus fixing the cache.
111-
if [ "$DEPLOY_ALT" = 1 ]; then
112-
sh -x -c "$SCRIPT \
113-
--exclude src/tools/rls \
114-
--exclude src/tools/rustfmt \
115-
--exclude src/tools/clippy"
116-
else
117-
sh -x -c "$SCRIPT"
118-
fi
110+
sh -x -c "$SCRIPT"
119111
else
120112
do_make() {
121113
travis_fold start "make-$1"

src/liballoc/tests/slice.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1351,7 +1351,7 @@ fn test_copy_from_slice_dst_shorter() {
13511351
const MAX_LEN: usize = 80;
13521352

13531353
static DROP_COUNTS: [AtomicUsize; MAX_LEN] = [
1354-
// FIXME #5244: AtomicUsize is not Copy.
1354+
// FIXME(RFC 1109): AtomicUsize is not Copy.
13551355
AtomicUsize::new(0), AtomicUsize::new(0), AtomicUsize::new(0), AtomicUsize::new(0),
13561356
AtomicUsize::new(0), AtomicUsize::new(0), AtomicUsize::new(0), AtomicUsize::new(0),
13571357
AtomicUsize::new(0), AtomicUsize::new(0), AtomicUsize::new(0), AtomicUsize::new(0),

src/libcore/convert.rs

+3-22
Original file line numberDiff line numberDiff line change
@@ -48,25 +48,6 @@
4848
4949
#![stable(feature = "rust1", since = "1.0.0")]
5050

51-
use fmt;
52-
53-
/// A type used as the error type for implementations of fallible conversion
54-
/// traits in cases where conversions cannot actually fail.
55-
///
56-
/// Because `Infallible` has no variants, a value of this type can never exist.
57-
/// It is used only to satisfy trait signatures that expect an error type, and
58-
/// signals to both the compiler and the user that the error case is impossible.
59-
#[unstable(feature = "try_from", issue = "33417")]
60-
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
61-
pub enum Infallible {}
62-
63-
#[unstable(feature = "try_from", issue = "33417")]
64-
impl fmt::Display for Infallible {
65-
fn fmt(&self, _: &mut fmt::Formatter) -> fmt::Result {
66-
match *self {
67-
}
68-
}
69-
}
7051
/// A cheap reference-to-reference conversion. Used to convert a value to a
7152
/// reference value within generic code.
7253
///
@@ -382,7 +363,7 @@ impl<'a, T: ?Sized, U: ?Sized> AsRef<U> for &'a mut T where T: AsRef<U>
382363
}
383364
}
384365

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

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

443424
fn try_from(value: U) -> Result<Self, Self::Error> {
444425
Ok(T::from(value))

src/libcore/iter/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1872,7 +1872,7 @@ impl<I: Iterator> Iterator for Peekable<I> {
18721872

18731873
#[inline]
18741874
fn nth(&mut self, n: usize) -> Option<I::Item> {
1875-
// FIXME(#6393): merge these when borrow-checking gets better.
1875+
// FIXME(#43234): merge these when borrow-checking gets better.
18761876
if n == 0 {
18771877
match self.peeked.take() {
18781878
Some(v) => v,

src/libcore/num/mod.rs

+8-9
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
1313
#![stable(feature = "rust1", since = "1.0.0")]
1414

15-
use convert::{Infallible, TryFrom};
15+
use convert::TryFrom;
1616
use fmt;
1717
use intrinsics;
1818
use ops;
@@ -3596,10 +3596,9 @@ impl fmt::Display for TryFromIntError {
35963596
}
35973597

35983598
#[unstable(feature = "try_from", issue = "33417")]
3599-
impl From<Infallible> for TryFromIntError {
3600-
fn from(infallible: Infallible) -> TryFromIntError {
3601-
match infallible {
3602-
}
3599+
impl From<!> for TryFromIntError {
3600+
fn from(never: !) -> TryFromIntError {
3601+
never
36033602
}
36043603
}
36053604

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

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

37243723
try_from_upper_bounded!(usize, u8);
37253724
try_from_unbounded!(usize, u16, u32, u64, u128);
@@ -3745,7 +3744,7 @@ mod ptr_try_from_impls {
37453744
#[cfg(target_pointer_width = "32")]
37463745
mod ptr_try_from_impls {
37473746
use super::TryFromIntError;
3748-
use convert::{Infallible, TryFrom};
3747+
use convert::TryFrom;
37493748

37503749
try_from_upper_bounded!(usize, u8, u16);
37513750
try_from_unbounded!(usize, u32, u64, u128);
@@ -3771,7 +3770,7 @@ mod ptr_try_from_impls {
37713770
#[cfg(target_pointer_width = "64")]
37723771
mod ptr_try_from_impls {
37733772
use super::TryFromIntError;
3774-
use convert::{Infallible, TryFrom};
3773+
use convert::TryFrom;
37753774

37763775
try_from_upper_bounded!(usize, u8, u16, u32);
37773776
try_from_unbounded!(usize, u64, u128);

0 commit comments

Comments
 (0)