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 #61510

Merged
merged 43 commits into from
Jun 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
15241a4
Fix documentation of `Rc::make_mut` regarding `rc::Weak`.
czipperz May 24, 2019
fbe9f16
Reword `are not other` to `are no other`
czipperz May 25, 2019
b34b714
Remove unused import in doctest
czipperz May 25, 2019
f23cbea
miri unsizing: fix projecting into a field of an operand
RalfJung May 31, 2019
5e3ff4c
Add test for condition in trait const param
varkor May 31, 2019
dfd9d04
Add an unusual-conversion example to to_uppercase
scottmcm Jun 1, 2019
7bdc38d
Succinctify splice docs
felixrabe Jun 1, 2019
911d205
On TerminatorKind::DropAndReplace still handle unused_mut correctly
czipperz Jun 1, 2019
c25b3df
Elide lifetimes not used
czipperz Jun 1, 2019
a39fffe
Add self parameter
czipperz Jun 2, 2019
0a6a5c8
Move debug statement into statement visitor
czipperz Jun 2, 2019
2a3b29e
Add anonymous lifetime to Place parameter
czipperz Jun 2, 2019
7feeaf0
Add test
czipperz Jun 2, 2019
eb73b73
Suggest using `as_ref` on `*const T`
estebank Jun 1, 2019
fea2cdb
Use a type implementing Drop
czipperz Jun 3, 2019
2be25e9
Allow TraitRef as AnonConst parent
varkor May 31, 2019
2b27c62
Allow `true` and `false` in const generic arguments
varkor May 31, 2019
d0c78dd
syntax: revert `ast::AsyncArgument` and associated changes.
eddyb May 29, 2019
3277107
syntax/rustc: move `mark_span_with_reason` back.
davidtwco May 31, 2019
1e5f496
rustc: async fn drop order lowering in HIR
davidtwco May 29, 2019
80df64b
ci: retry s3 upload on azure if it fails
pietroalbini Jun 3, 2019
5e3b41e
rustc: remove `HirId` from `ArgSource::AsyncFn`
davidtwco Jun 2, 2019
3ebe9ab
rustc: use lowering helpers
davidtwco Jun 2, 2019
3c7e0eb
rustc: construct statement vector directly
davidtwco Jun 3, 2019
2bb92aa
rustc: remove `ArgSource`
davidtwco Jun 3, 2019
b87bad7
ci: Reenable step timings on AppVeyor
alexcrichton Jun 3, 2019
242056c
Do not panic in tidy on unbalanced parentheses in cfg's
Mark-Simulacrum Jun 3, 2019
41dd21a
Add a regression test for #53457
varkor Jun 3, 2019
1c6dce8
Add ui/impl-trait/issues folder
varkor Jun 3, 2019
5ce3c81
Treat 0 as special value for codegen-units-std
Mark-Simulacrum Jun 3, 2019
45cdc6d
Rollup merge of #61135 - czipperz:rc-make_mut-weak-doc, r=Mark-Simula…
Centril Jun 4, 2019
fb4652e
Rollup merge of #61404 - RalfJung:miri-unsize, r=oli-obk
Centril Jun 4, 2019
1563514
Rollup merge of #61409 - varkor:condition-trait-param-ice, r=oli-obk
Centril Jun 4, 2019
3a06a93
Rollup merge of #61413 - davidtwco:async-argument-order-in-a-sane-way…
Centril Jun 4, 2019
5d1d299
Rollup merge of #61419 - scottmcm:casing-is-on-strings, r=cramertj
Centril Jun 4, 2019
1ae4727
Rollup merge of #61420 - felixrabe:patch-2, r=dtolnay
Centril Jun 4, 2019
28ce2b1
Rollup merge of #61444 - estebank:const-pt-as-ref, r=matthewjasper
Centril Jun 4, 2019
f8a2363
Rollup merge of #61446 - czipperz:nll-unused_mut, r=matthewjasper
Centril Jun 4, 2019
31d7aa4
Rollup merge of #61485 - pietroalbini:retry-azure-upload, r=alexcrichton
Centril Jun 4, 2019
cb2feb6
Rollup merge of #61489 - alexcrichton:appveyor-timings, r=pietroalbini
Centril Jun 4, 2019
6ad6ef2
Rollup merge of #61496 - Mark-Simulacrum:tidy-unbalanced-parens, r=va…
Centril Jun 4, 2019
5deaa0a
Rollup merge of #61497 - Mark-Simulacrum:codegen-units-std-num-cpus, …
Centril Jun 4, 2019
5baa58e
Rollup merge of #61499 - varkor:issue-53457, r=oli-obk
Centril Jun 4, 2019
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
3 changes: 2 additions & 1 deletion .azure-pipelines/steps/run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ steps:
# bucket.
- bash: |
set -e
source src/ci/shared.sh
if [ "$AGENT_OS" = "Linux" ]; then
rm -rf obj/build/dist/doc
upload_dir=obj/build/dist
Expand All @@ -130,7 +131,7 @@ steps:
if [ "$DEPLOY_ALT" == "1" ]; then
deploy_dir=rustc-builds-alt
fi
aws s3 cp --no-progress --recursive --acl public-read ./$upload_dir s3://$DEPLOY_BUCKET/$deploy_dir/$BUILD_SOURCEVERSION
retry aws s3 cp --no-progress --recursive --acl public-read ./$upload_dir s3://$DEPLOY_BUCKET/$deploy_dir/$BUILD_SOURCEVERSION
env:
AWS_SECRET_ACCESS_KEY: $(AWS_SECRET_ACCESS_KEY)
condition: and(succeeded(), or(eq(variables.DEPLOY, '1'), eq(variables.DEPLOY_ALT, '1')))
Expand Down
19 changes: 10 additions & 9 deletions src/bootstrap/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ use std::process;
use std::cmp;

use build_helper::t;
use num_cpus;
use toml;
use serde::Deserialize;
use crate::cache::{INTERNER, Interned};
Expand Down Expand Up @@ -401,7 +400,7 @@ impl Config {
config.rustc_error_format = flags.rustc_error_format;
config.on_fail = flags.on_fail;
config.stage = flags.stage;
config.jobs = flags.jobs;
config.jobs = flags.jobs.map(threads_from_config);
config.cmd = flags.cmd;
config.incremental = flags.incremental;
config.dry_run = flags.dry_run;
Expand Down Expand Up @@ -583,13 +582,8 @@ impl Config {

set(&mut config.rust_codegen_backends_dir, rust.codegen_backends_dir.clone());

match rust.codegen_units {
Some(0) => config.rust_codegen_units = Some(num_cpus::get() as u32),
Some(n) => config.rust_codegen_units = Some(n),
None => {}
}

config.rust_codegen_units_std = rust.codegen_units_std;
config.rust_codegen_units = rust.codegen_units.map(threads_from_config);
config.rust_codegen_units_std = rust.codegen_units_std.map(threads_from_config);
}

if let Some(ref t) = toml.target {
Expand Down Expand Up @@ -688,3 +682,10 @@ fn set<T>(field: &mut T, val: Option<T>) {
*field = v;
}
}

fn threads_from_config(v: u32) -> u32 {
match v {
0 => num_cpus::get() as u32,
n => n,
}
}
2 changes: 2 additions & 0 deletions src/ci/shared.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ function isOSX {
function getCIBranch {
if [ "$TRAVIS" = "true" ]; then
echo "$TRAVIS_BRANCH"
elif [ "$APPVEYOR" = "True" ]; then
echo "$APPVEYOR_REPO_BRANCH"
else
echo "$BUILD_SOURCEBRANCHNAME"
fi;
Expand Down
34 changes: 27 additions & 7 deletions src/liballoc/rc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -580,15 +580,18 @@ impl<T: ?Sized> Rc<T> {
impl<T: Clone> Rc<T> {
/// Makes a mutable reference into the given `Rc`.
///
/// If there are other `Rc` or [`Weak`][weak] pointers to the same value,
/// then `make_mut` will invoke [`clone`][clone] on the inner value to
/// ensure unique ownership. This is also referred to as clone-on-write.
/// If there are other `Rc` pointers to the same value, then `make_mut` will
/// [`clone`] the inner value to ensure unique ownership. This is also
/// referred to as clone-on-write.
///
/// See also [`get_mut`][get_mut], which will fail rather than cloning.
/// If there are no other `Rc` pointers to this value, then [`Weak`]
/// pointers to this value will be dissassociated.
///
/// [weak]: struct.Weak.html
/// [clone]: ../../std/clone/trait.Clone.html#tymethod.clone
/// [get_mut]: struct.Rc.html#method.get_mut
/// See also [`get_mut`], which will fail rather than cloning.
///
/// [`Weak`]: struct.Weak.html
/// [`clone`]: ../../std/clone/trait.Clone.html#tymethod.clone
/// [`get_mut`]: struct.Rc.html#method.get_mut
///
/// # Examples
///
Expand All @@ -607,6 +610,23 @@ impl<T: Clone> Rc<T> {
/// assert_eq!(*data, 8);
/// assert_eq!(*other_data, 12);
/// ```
///
/// [`Weak`] pointers will be dissassociated:
///
/// ```
/// use std::rc::Rc;
///
/// let mut data = Rc::new(75);
/// let weak = Rc::downgrade(&data);
///
/// assert!(75 == *data);
/// assert!(75 == *weak.upgrade().unwrap());
///
/// *Rc::make_mut(&mut data) += 1;
///
/// assert!(76 == *data);
/// assert!(weak.upgrade().is_none());
/// ```
#[inline]
#[stable(feature = "rc_unique", since = "1.4.0")]
pub fn make_mut(this: &mut Self) -> &mut T {
Expand Down
7 changes: 7 additions & 0 deletions src/liballoc/str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,13 @@ impl str {
///
/// assert_eq!(new_year, new_year.to_uppercase());
/// ```
///
/// One character can become multiple:
/// ```
/// let s = "tschüß";
///
/// assert_eq!("TSCHÜSS", s.to_uppercase());
/// ```
#[stable(feature = "unicode_case_mapping", since = "1.2.0")]
pub fn to_uppercase(&self) -> String {
let mut s = String::with_capacity(self.len());
Expand Down
10 changes: 4 additions & 6 deletions src/liballoc/vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2018,16 +2018,14 @@ impl<T> Vec<T> {
/// with the given `replace_with` iterator and yields the removed items.
/// `replace_with` does not need to be the same length as `range`.
///
/// Note 1: The element range is removed even if the iterator is not
/// consumed until the end.
/// The element range is removed even if the iterator is not consumed until the end.
///
/// Note 2: It is unspecified how many elements are removed from the vector,
/// It is unspecified how many elements are removed from the vector
/// if the `Splice` value is leaked.
///
/// Note 3: The input iterator `replace_with` is only consumed
/// when the `Splice` value is dropped.
/// The input iterator `replace_with` is only consumed when the `Splice` value is dropped.
///
/// Note 4: This is optimal if:
/// This is optimal if:
///
/// * The tail (elements in the vector after `range`) is empty,
/// * or `replace_with` yields fewer elements than `range`’s length
Expand Down
10 changes: 0 additions & 10 deletions src/librustc/hir/intravisit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -262,9 +262,6 @@ pub trait Visitor<'v> : Sized {
fn visit_pat(&mut self, p: &'v Pat) {
walk_pat(self, p)
}
fn visit_argument_source(&mut self, s: &'v ArgSource) {
walk_argument_source(self, s)
}
fn visit_anon_const(&mut self, c: &'v AnonConst) {
walk_anon_const(self, c)
}
Expand Down Expand Up @@ -402,17 +399,10 @@ pub fn walk_body<'v, V: Visitor<'v>>(visitor: &mut V, body: &'v Body) {
for argument in &body.arguments {
visitor.visit_id(argument.hir_id);
visitor.visit_pat(&argument.pat);
visitor.visit_argument_source(&argument.source);
}
visitor.visit_expr(&body.value);
}

pub fn walk_argument_source<'v, V: Visitor<'v>>(visitor: &mut V, source: &'v ArgSource) {
if let ArgSource::AsyncFn(pat) = source {
visitor.visit_pat(pat);
}
}

pub fn walk_local<'v, V: Visitor<'v>>(visitor: &mut V, local: &'v Local) {
// Intentionally visiting the expr first - the initialization expr
// dominates the local's definition.
Expand Down
Loading