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 13 pull requests #48776

Closed
wants to merge 38 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
238bb38
First version
pvdrz Feb 22, 2018
f9e049a
add info about sync
pvdrz Feb 23, 2018
58d1f83
remove redundant info
pvdrz Feb 23, 2018
43de01f
cleaned trailing whitespaces
pvdrz Feb 23, 2018
5344b07
Add new warning for CStr::from_ptr
GuillaumeGomez Feb 24, 2018
ce3ad26
added link to sync containers
pvdrz Feb 24, 2018
7ded7f7
corrected grammar errors
pvdrz Feb 24, 2018
397ce8a
fixed links
pvdrz Feb 25, 2018
9091584
some grammar corrections
pvdrz Feb 26, 2018
df8dd3f
doc: no need for the references
tshepang Feb 28, 2018
e822e62
Suggest type for overflowing bin/hex-literals
flip1995 Feb 22, 2018
19c4771
Implementing requested changes
flip1995 Feb 22, 2018
5c70619
Rewrite error reporting as requested
flip1995 Feb 24, 2018
f45f760
Adapt stderr of UI test to PR #48449
flip1995 Mar 1, 2018
f7693c0
Fix spelling s/casted/cast/
lukaslueg Feb 21, 2018
15ecf06
Remove isize test
flip1995 Mar 2, 2018
fc33b25
Improve getting literal representation
flip1995 Mar 3, 2018
04da856
Update sccache to its master branch
alexcrichton Mar 1, 2018
0b0e1b7
Refactor contrived match.
leoyvens Mar 4, 2018
1c191b2
Add note for unterminated raw string error
GuillaumeGomez Feb 26, 2018
16ac85c
Remove useless powerpc64 entry from ARCH_TABLE, closes #47737
debris Mar 4, 2018
88f32d1
Remove a couple of `isize` references from hashmap docs
tbu- Mar 5, 2018
2e7e68b
while let all the things
leoyvens Mar 5, 2018
831009f
Add resource-suffix option for rustdoc
GuillaumeGomez Feb 24, 2018
2ec47e0
Remove seemingly unused sugarise-doc-comments Python script.
frewsxcv Mar 6, 2018
a3201a9
Rollup merge of #48403 - lukaslueg:casted, r=steveklabnik
GuillaumeGomez Mar 6, 2018
8c07934
Rollup merge of #48432 - flip1995:lit_diag, r=oli-obk
GuillaumeGomez Mar 6, 2018
4b69bd7
Rollup merge of #48474 - christianpoveda:new_cell_docs, r=steveklabnik
GuillaumeGomez Mar 6, 2018
75bc23d
Rollup merge of #48507 - GuillaumeGomez:cstr-note, r=steveklabnik
GuillaumeGomez Mar 6, 2018
afb617a
Rollup merge of #48511 - GuillaumeGomez:rustdoc-resource-suffix, r=Qu…
GuillaumeGomez Mar 6, 2018
90b38d5
Rollup merge of #48546 - GuillaumeGomez:raw-string-error-note, r=este…
GuillaumeGomez Mar 6, 2018
11b3e72
Rollup merge of #48590 - tshepang:more-simple, r=frewsxcv
GuillaumeGomez Mar 6, 2018
ae76ad0
Rollup merge of #48647 - alexcrichton:update-sccache, r=kennytm
GuillaumeGomez Mar 6, 2018
13a9300
Rollup merge of #48727 - leodasvacas:refactor-contrived-match, r=rkruppe
GuillaumeGomez Mar 6, 2018
64cb871
Rollup merge of #48732 - debris:remove_powerpc64, r=alexcrichton
GuillaumeGomez Mar 6, 2018
c66b57a
Rollup merge of #48753 - tbu-:pr_hashmap_isize, r=BurntSushi
GuillaumeGomez Mar 6, 2018
7a548f5
Rollup merge of #48754 - leodasvacas:while-let-all-the-things, r=rkruppe
GuillaumeGomez Mar 6, 2018
b768548
Rollup merge of #48761 - frewsxcv:frewsxcv-rm-python, r=alexcrichton
GuillaumeGomez Mar 6, 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
13 changes: 1 addition & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ matrix:
SRC=.
DEPLOY_ALT=1
RUSTC_RETRY_LINKER_ON_SEGFAULT=1
SCCACHE_ERROR_LOG=/tmp/sccache.log
MACOSX_DEPLOYMENT_TARGET=10.7
NO_LLVM_ASSERTIONS=1
NO_DEBUG_ASSERTIONS=1
Expand All @@ -50,7 +49,6 @@ matrix:
RUST_CONFIGURE_ARGS="--build=x86_64-apple-darwin --enable-sanitizers --enable-profiler"
SRC=.
RUSTC_RETRY_LINKER_ON_SEGFAULT=1
SCCACHE_ERROR_LOG=/tmp/sccache.log
MACOSX_DEPLOYMENT_TARGET=10.8
MACOSX_STD_DEPLOYMENT_TARGET=10.7
NO_LLVM_ASSERTIONS=1
Expand All @@ -64,7 +62,6 @@ matrix:
RUST_CONFIGURE_ARGS=--build=i686-apple-darwin
SRC=.
RUSTC_RETRY_LINKER_ON_SEGFAULT=1
SCCACHE_ERROR_LOG=/tmp/sccache.log
MACOSX_DEPLOYMENT_TARGET=10.8
MACOSX_STD_DEPLOYMENT_TARGET=10.7
NO_LLVM_ASSERTIONS=1
Expand All @@ -85,7 +82,6 @@ matrix:
SRC=.
DEPLOY=1
RUSTC_RETRY_LINKER_ON_SEGFAULT=1
SCCACHE_ERROR_LOG=/tmp/sccache.log
MACOSX_DEPLOYMENT_TARGET=10.7
NO_LLVM_ASSERTIONS=1
NO_DEBUG_ASSERTIONS=1
Expand All @@ -99,7 +95,6 @@ matrix:
SRC=.
DEPLOY=1
RUSTC_RETRY_LINKER_ON_SEGFAULT=1
SCCACHE_ERROR_LOG=/tmp/sccache.log
MACOSX_DEPLOYMENT_TARGET=10.7
NO_LLVM_ASSERTIONS=1
NO_DEBUG_ASSERTIONS=1
Expand Down Expand Up @@ -223,7 +218,7 @@ install:
travis_retry brew update &&
travis_retry brew install xz;
fi &&
travis_retry curl -fo /usr/local/bin/sccache https://s3-us-west-1.amazonaws.com/rust-lang-ci2/rust-ci-mirror/2017-05-12-sccache-x86_64-apple-darwin &&
travis_retry curl -fo /usr/local/bin/sccache https://s3-us-west-1.amazonaws.com/rust-lang-ci2/rust-ci-mirror/2018-03-01-sccache-x86_64-apple-darwin &&
chmod +x /usr/local/bin/sccache &&
travis_retry curl -fo /usr/local/bin/stamp https://s3-us-west-1.amazonaws.com/rust-lang-ci2/rust-ci-mirror/2017-03-17-stamp-x86_64-apple-darwin &&
chmod +x /usr/local/bin/stamp
Expand Down Expand Up @@ -264,12 +259,6 @@ after_failure:
df -h;
du . | sort -nr | head -n100

# One of these is the linux sccache log, one is the OSX sccache log. Instead
# of worrying about what system we are just cat both. One of these commands
# will fail but that's ok, they'll both get executed.
- cat obj/tmp/sccache.log
- cat /tmp/sccache.log

# Random attempt at debugging currently. Just poking around in here to see if
# anything shows up.
- ls -lat $HOME/Library/Logs/DiagnosticReports/
Expand Down
10 changes: 2 additions & 8 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@ install:
- set PATH=C:\Python27;%PATH%

# Download and install sccache
- appveyor-retry appveyor DownloadFile https://s3-us-west-1.amazonaws.com/rust-lang-ci2/rust-ci-mirror/2017-05-12-sccache-x86_64-pc-windows-msvc
- mv 2017-05-12-sccache-x86_64-pc-windows-msvc sccache.exe
- appveyor-retry appveyor DownloadFile https://s3-us-west-1.amazonaws.com/rust-lang-ci2/rust-ci-mirror/2018-03-01-sccache-x86_64-pc-windows-msvc
- mv 2018-03-01-sccache-x86_64-pc-windows-msvc sccache.exe
- set PATH=%PATH%;%CD%

# Download and install ninja
Expand All @@ -170,19 +170,13 @@ install:
- set PATH=%PATH%;%CD%\handle
- handle.exe -accepteula -help

# Attempt to debug sccache failures
- set SCCACHE_ERROR_LOG=%CD%/sccache.log

test_script:
- if not exist C:\cache\rustsrc\NUL mkdir C:\cache\rustsrc
- sh src/ci/init_repo.sh . /c/cache/rustsrc
- set SRC=.
- set NO_CCACHE=1
- sh src/ci/run.sh

on_failure:
- cat %CD%\sccache.log || exit 0

branches:
only:
- auto
Expand Down
2 changes: 0 additions & 2 deletions src/ci/docker/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@ if [ "$SCCACHE_BUCKET" != "" ]; then
args="$args --env SCCACHE_REGION"
args="$args --env AWS_ACCESS_KEY_ID"
args="$args --env AWS_SECRET_ACCESS_KEY"
args="$args --env SCCACHE_ERROR_LOG=/tmp/sccache/sccache.log"
args="$args --volume $objdir/tmp:/tmp/sccache"
else
mkdir -p $HOME/.cache/sccache
args="$args --env SCCACHE_DIR=/sccache --volume $HOME/.cache/sccache:/sccache"
Expand Down
2 changes: 1 addition & 1 deletion src/ci/docker/scripts/sccache.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
set -ex

curl -fo /usr/local/bin/sccache \
https://s3-us-west-1.amazonaws.com/rust-lang-ci2/rust-ci-mirror/2017-05-12-sccache-x86_64-unknown-linux-musl
https://s3-us-west-1.amazonaws.com/rust-lang-ci2/rust-ci-mirror/2018-03-01-sccache-x86_64-unknown-linux-musl

chmod +x /usr/local/bin/sccache
93 changes: 0 additions & 93 deletions src/etc/sugarise-doc-comments.py

This file was deleted.

18 changes: 18 additions & 0 deletions src/libcore/cell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,24 @@

//! Shareable mutable containers.
//!
//! Rust memory safety is based on this rule: Given an object `T`, it is only possible to
//! have one of the following:
//!
//! - Having several immutable references (`&T`) to the object (also known as **aliasing**).
//! - Having one mutable reference (`&mut T`) to the object (also known as **mutability**).
//!
//! This is enforced by the Rust compiler. However, there are situations where this rule is not
//! flexible enough. Sometimes it is required to have multiple references to an object and yet
//! mutate it.
//!
//! Shareable mutable containers exist to permit mutability in a controlled manner, even in the
//! presence of aliasing. Both `Cell<T>` and `RefCell<T>` allows to do this in a single threaded
//! way. However, neither `Cell<T>` nor `RefCell<T>` are thread safe (they do not implement
//! `Sync`). If you need to do aliasing and mutation between multiple threads it is possible to
//! use [`Mutex`](../../std/sync/struct.Mutex.html),
//! [`RwLock`](../../std/sync/struct.RwLock.html) or
//! [`atomic`](../../core/sync/atomic/index.html) types.
//!
//! Values of the `Cell<T>` and `RefCell<T>` types may be mutated through shared references (i.e.
//! the common `&T` type), whereas most Rust types can only be mutated through unique (`&mut T`)
//! references. We say that `Cell<T>` and `RefCell<T>` provide 'interior mutability', in contrast
Expand Down
4 changes: 2 additions & 2 deletions src/libcore/char.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ pub const MAX: char = '\u{10ffff}';

/// Converts a `u32` to a `char`.
///
/// Note that all [`char`]s are valid [`u32`]s, and can be casted to one with
/// Note that all [`char`]s are valid [`u32`]s, and can be cast to one with
/// [`as`]:
///
/// ```
Expand Down Expand Up @@ -131,7 +131,7 @@ pub fn from_u32(i: u32) -> Option<char> {

/// Converts a `u32` to a `char`, ignoring validity.
///
/// Note that all [`char`]s are valid [`u32`]s, and can be casted to one with
/// Note that all [`char`]s are valid [`u32`]s, and can be cast to one with
/// [`as`]:
///
/// ```
Expand Down
53 changes: 22 additions & 31 deletions src/libcore/iter/iterator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1180,26 +1180,27 @@ pub trait Iterator {
///
/// // this iterator sequence is complex.
/// let sum = a.iter()
/// .cloned()
/// .filter(|&x| x % 2 == 0)
/// .fold(0, |sum, i| sum + i);
/// .cloned()
/// .filter(|x| x % 2 == 0)
/// .fold(0, |sum, i| sum + i);
///
/// println!("{}", sum);
///
/// // let's add some inspect() calls to investigate what's happening
/// let sum = a.iter()
/// .cloned()
/// .inspect(|x| println!("about to filter: {}", x))
/// .filter(|&x| x % 2 == 0)
/// .inspect(|x| println!("made it through filter: {}", x))
/// .fold(0, |sum, i| sum + i);
/// .cloned()
/// .inspect(|x| println!("about to filter: {}", x))
/// .filter(|x| x % 2 == 0)
/// .inspect(|x| println!("made it through filter: {}", x))
/// .fold(0, |sum, i| sum + i);
///
/// println!("{}", sum);
/// ```
///
/// This will print:
///
/// ```text
/// 6
/// about to filter: 1
/// about to filter: 4
/// made it through filter: 4
Expand Down Expand Up @@ -1230,8 +1231,7 @@ pub trait Iterator {
///
/// let iter = a.into_iter();
///
/// let sum: i32 = iter.take(5)
/// .fold(0, |acc, &i| acc + i );
/// let sum: i32 = iter.take(5).fold(0, |acc, i| acc + i );
///
/// assert_eq!(sum, 6);
///
Expand All @@ -1245,9 +1245,7 @@ pub trait Iterator {
/// let mut iter = a.into_iter();
///
/// // instead, we add in a .by_ref()
/// let sum: i32 = iter.by_ref()
/// .take(2)
/// .fold(0, |acc, &i| acc + i );
/// let sum: i32 = iter.by_ref().take(2).fold(0, |acc, i| acc + i );
///
/// assert_eq!(sum, 3);
///
Expand Down Expand Up @@ -1304,9 +1302,7 @@ pub trait Iterator {
///
/// let a = [1, 2, 3];
///
/// let doubled: VecDeque<i32> = a.iter()
/// .map(|&x| x * 2)
/// .collect();
/// let doubled: VecDeque<i32> = a.iter().map(|&x| x * 2).collect();
///
/// assert_eq!(2, doubled[0]);
/// assert_eq!(4, doubled[1]);
Expand All @@ -1318,9 +1314,7 @@ pub trait Iterator {
/// ```
/// let a = [1, 2, 3];
///
/// let doubled = a.iter()
/// .map(|&x| x * 2)
/// .collect::<Vec<i32>>();
/// let doubled = a.iter().map(|x| x * 2).collect::<Vec<i32>>();
///
/// assert_eq!(vec![2, 4, 6], doubled);
/// ```
Expand All @@ -1331,9 +1325,7 @@ pub trait Iterator {
/// ```
/// let a = [1, 2, 3];
///
/// let doubled = a.iter()
/// .map(|&x| x * 2)
/// .collect::<Vec<_>>();
/// let doubled = a.iter().map(|x| x * 2).collect::<Vec<_>>();
///
/// assert_eq!(vec![2, 4, 6], doubled);
/// ```
Expand All @@ -1344,9 +1336,9 @@ pub trait Iterator {
/// let chars = ['g', 'd', 'k', 'k', 'n'];
///
/// let hello: String = chars.iter()
/// .map(|&x| x as u8)
/// .map(|x| (x + 1) as char)
/// .collect();
/// .map(|&x| x as u8)
/// .map(|x| (x + 1) as char)
/// .collect();
///
/// assert_eq!("hello", hello);
/// ```
Expand Down Expand Up @@ -1393,8 +1385,9 @@ pub trait Iterator {
/// ```
/// let a = [1, 2, 3];
///
/// let (even, odd): (Vec<i32>, Vec<i32>) = a.into_iter()
/// .partition(|&n| n % 2 == 0);
/// let (even, odd): (Vec<i32>, Vec<i32>) = a
/// .into_iter()
/// .partition(|&n| n % 2 == 0);
///
/// assert_eq!(even, vec![2]);
/// assert_eq!(odd, vec![1, 3]);
Expand Down Expand Up @@ -1457,8 +1450,7 @@ pub trait Iterator {
/// let a = [1, 2, 3];
///
/// // the checked sum of all of the elements of the array
/// let sum = a.iter()
/// .try_fold(0i8, |acc, &x| acc.checked_add(x));
/// let sum = a.iter().try_fold(0i8, |acc, &x| acc.checked_add(x));
///
/// assert_eq!(sum, Some(6));
/// ```
Expand Down Expand Up @@ -1556,8 +1548,7 @@ pub trait Iterator {
/// let a = [1, 2, 3];
///
/// // the sum of all of the elements of the array
/// let sum = a.iter()
/// .fold(0, |acc, &x| acc + x);
/// let sum = a.iter().fold(0, |acc, x| acc + x);
///
/// assert_eq!(sum, 6);
/// ```
Expand Down
9 changes: 2 additions & 7 deletions src/librustc/hir/print.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2208,13 +2208,8 @@ impl<'a> State<'a> {
if self.next_comment().is_none() {
self.s.hardbreak()?;
}
loop {
match self.next_comment() {
Some(ref cmnt) => {
self.print_comment(cmnt)?;
}
_ => break,
}
while let Some(ref cmnt) = self.next_comment() {
self.print_comment(cmnt)?
}
Ok(())
}
Expand Down
Loading