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

Merged
merged 39 commits into from
Jan 28, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
0d39584
Detect double reference when applying binary op
estebank Jun 23, 2016
b8669df
Ensure type is copyable before emitting note suggesting adding manual…
pnkfelix Dec 26, 2016
2b7a23e
Hide uninhabitedness checks behind feature gate
canndrew Jan 25, 2017
9e8785f
rustbuild: Add manifest generation in-tree
alexcrichton Jan 24, 2017
8944582
travis: Upload all artifacts in build/dist
alexcrichton Jan 25, 2017
671b1c1
std: Stabilize APIs for the 1.16.0 release
alexcrichton Jan 25, 2017
ff11f98
drop_in_place is stable now, don't #![feature] it in the nomicon and …
est31 Jan 26, 2017
f02c9e3
Rewrite the first sentence in slice::sort
Jan 26, 2017
eaf182e
Add note for E0117
GuillaumeGomez Jan 25, 2017
fc490ad
doc comment typo fix
king6cong Jan 26, 2017
36ad34d
save-analysis: get tables directly, accomodating them being missing
nrc Jan 25, 2017
8ad06af
Avoid ICE when pretty-printing non-local MIR item.
solson Jan 26, 2017
b8036b6
Fix another endian-ness issue in i128 trans
nagisa Jan 27, 2017
d83687f
Fix can_begin_expr keyword behavior
cramertj Jan 27, 2017
09b3903
Fix a few links in the docs
ollie27 Jan 27, 2017
0f2a5f6
Fix up @carols10cents' mailmap entry
steveklabnik Jan 27, 2017
945177d
Fix @jethrogb's mailmap entry
steveklabnik Jan 27, 2017
810b22b
Fix cyryl's mailmap entry
steveklabnik Jan 27, 2017
f4010d7
move `cast_kinds` into `TypeckTables` where it belongs
nikomatsakis Jan 27, 2017
98bc300
Use __SIZEOF_INT128__ to test __int128 presence
nagisa Jan 27, 2017
a2a3074
Rollup merge of #38617 - pnkfelix:double-reference, r=pnkfelix
alexcrichton Jan 27, 2017
f165861
Rollup merge of #39284 - alexcrichton:manifesting, r=brson
alexcrichton Jan 27, 2017
666fc45
Rollup merge of #39285 - nrc:save-tables, r=@eddyb
alexcrichton Jan 27, 2017
0e64d49
Rollup merge of #39290 - canndrew:hide-uninhabitedness, r=nikomatsakis
alexcrichton Jan 27, 2017
ac1e923
Rollup merge of #39302 - alexcrichton:upload-all, r=brson
alexcrichton Jan 27, 2017
13e3b36
Rollup merge of #39306 - GuillaumeGomez:newtype_help, r=eddyb
alexcrichton Jan 27, 2017
0edc3d3
Rollup merge of #39307 - alexcrichton:stabilize-1.16, r=brson
alexcrichton Jan 27, 2017
e1a5c46
Rollup merge of #39311 - solson:fix-unpretty-mir-non-local, r=eddyb
alexcrichton Jan 27, 2017
06fcccf
Rollup merge of #39313 - est31:drop_in_place_is_stable, r=GuillaumeGomez
alexcrichton Jan 27, 2017
4ef67ba
Rollup merge of #39314 - stjepang:rewrite-sort-header, r=brson
alexcrichton Jan 27, 2017
a5ff116
Rollup merge of #39321 - king6cong:master, r=frewsxcv
alexcrichton Jan 27, 2017
30ae115
Rollup merge of #39332 - nagisa:another-bigendian-128, r=eddyb
alexcrichton Jan 27, 2017
915242a
Rollup merge of #39335 - cramertj:cramertj/can_begin_expr_fix, r=petr…
alexcrichton Jan 27, 2017
7c75608
Rollup merge of #39344 - ollie27:links, r=steveklabnik
alexcrichton Jan 27, 2017
854690c
Rollup merge of #39345 - steveklabnik:carol-mailmap, r=alexcrichton
alexcrichton Jan 27, 2017
86af9a1
Rollup merge of #39346 - steveklabnik:jethro-mailmap, r=brson
alexcrichton Jan 27, 2017
ebe17b0
Rollup merge of #39348 - steveklabnik:cyryl-mailmap, r=alexcrichton
alexcrichton Jan 27, 2017
9eb0068
Rollup merge of #39350 - nagisa:i128-test-helpers-better-def, r=alexc…
alexcrichton Jan 27, 2017
1767d97
Rollup merge of #39351 - nikomatsakis:incr-comp-skip-typeck-1, r=eddyb
alexcrichton Jan 27, 2017
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
6 changes: 4 additions & 2 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ Brian Anderson <banderson@mozilla.com> <andersrb@gmail.com>
Brian Dawn <brian.t.dawn@gmail.com>
Brian Leibig <brian@brianleibig.com> Brian Leibig <brian.leibig@gmail.com>
Carl-Anton Ingmarsson <mail@carlanton.se> <ca.ingmarsson@gmail.com>
Carol (Nichols || Goulding) <carol.nichols@gmail.com> Carol Nichols <carol.nichols@gmail.com>
Carol (Nichols || Goulding) <carol.nichols@gmail.com> Carol Nichols <cnichols@thinkthroughmath.com>
Carol (Nichols || Goulding) <carol.nichols@gmail.com>
Carol (Nichols || Goulding) <cnichols@thinkthroughmath.com>
Carol Willing <carolcode@willingconsulting.com>
Chris C Cerami <chrisccerami@users.noreply.github.com> Chris C Cerami <chrisccerami@gmail.com>
Chris Pressey <cpressey@gmail.com>
Expand All @@ -53,6 +53,7 @@ Clark Gaebel <cg.wowus.cg@gmail.com> <cgaebel@mozilla.com>
Clinton Ryan <clint.ryan3@gmail.com>
Corey Farwell <coreyf+rust@rwell.org> Corey Farwell <coreyf@rwell.org>
Corey Richardson <corey@octayn.net> Elaine "See More" Nemo <corey@octayn.net>
Cyryl Płotnicki <cyplo@cyplo.net>
Damien Schoof <damien.schoof@gmail.com>
Daniel Ramos <dan@daramos.com>
David Klein <david.klein@baesystemsdetica.com>
Expand Down Expand Up @@ -102,6 +103,7 @@ Jason Toffaletti <toffaletti@gmail.com> Jason Toffaletti <jason@topsy.com>
Jauhien Piatlicki <jauhien@gentoo.org> Jauhien Piatlicki <jpiatlicki@zertisa.com>
Jay True <glacjay@gmail.com>
Jeremy Letang <letang.jeremy@gmail.com>
Jethro Beekman <github@jbeekman.nl>
Jihyun Yu <j.yu@navercorp.com> <yjh0502@gmail.com>
Jihyun Yu <j.yu@navercorp.com> jihyun <jihyun@nablecomm.com>
Jihyun Yu <j.yu@navercorp.com> Jihyun Yu <jihyun@nclab.kaist.ac.kr>
Expand Down
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ before_deploy:
- mkdir -p deploy/$TRAVIS_COMMIT
- >
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
cp build/dist/*.tar.gz deploy/$TRAVIS_COMMIT;
cp -r build/dist deploy/$TRAVIS_COMMIT;
else
cp obj/build/dist/*.tar.gz deploy/$TRAVIS_COMMIT;
cp -r obj/build/dist deploy/$TRAVIS_COMMIT;
fi

deploy:
Expand Down
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ branches:
before_deploy:
- ps: |
New-Item -Path deploy -ItemType directory
Get-ChildItem -Path build\dist -Filter '*.tar.gz' | Move-Item -Destination deploy
Get-ChildItem -Path build\dist | Move-Item -Destination deploy
Get-ChildItem -Path deploy | Foreach-Object {
Push-AppveyorArtifact $_.FullName -FileName ${env:APPVEYOR_REPO_COMMIT}/$_
}
Expand All @@ -151,7 +151,7 @@ deploy:
bucket: rust-lang-ci
set_public: true
region: us-east-1
artifact: /.*\.tar.gz/
artifact: /.*/
folder: rustc-builds
on:
branch: auto
Expand Down
8 changes: 8 additions & 0 deletions src/Cargo.lock

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

1 change: 1 addition & 0 deletions src/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ members = [
"tools/linkchecker",
"tools/rustbook",
"tools/tidy",
"tools/build-manifest",
]

# Curiously, compiletest will segfault if compiled with opt-level=3 on 64-bit
Expand Down
19 changes: 19 additions & 0 deletions src/bootstrap/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ pub struct Config {
pub cargo: Option<PathBuf>,
pub local_rebuild: bool,

// dist misc
pub dist_sign_folder: Option<PathBuf>,
pub dist_upload_addr: Option<String>,
pub dist_gpg_password_file: Option<PathBuf>,

// libstd features
pub debug_jemalloc: bool,
pub use_jemalloc: bool,
Expand Down Expand Up @@ -123,6 +128,7 @@ struct TomlConfig {
llvm: Option<Llvm>,
rust: Option<Rust>,
target: Option<HashMap<String, TomlTarget>>,
dist: Option<Dist>,
}

/// TOML representation of various global build decisions.
Expand Down Expand Up @@ -166,6 +172,13 @@ struct Llvm {
targets: Option<String>,
}

#[derive(RustcDecodable, Default, Clone)]
struct Dist {
sign_folder: Option<String>,
gpg_password_file: Option<String>,
upload_addr: Option<String>,
}

#[derive(RustcDecodable)]
enum StringOrBool {
String(String),
Expand Down Expand Up @@ -352,6 +365,12 @@ impl Config {
}
}

if let Some(ref t) = toml.dist {
config.dist_sign_folder = t.sign_folder.clone().map(PathBuf::from);
config.dist_gpg_password_file = t.gpg_password_file.clone().map(PathBuf::from);
config.dist_upload_addr = t.upload_addr.clone();
}

return config
}

Expand Down
30 changes: 30 additions & 0 deletions src/bootstrap/config.toml.example
Original file line number Diff line number Diff line change
Expand Up @@ -242,3 +242,33 @@
# that this option only makes sense for MUSL targets that produce statically
# linked binaries
#musl-root = "..."

# =============================================================================
# Distribution options
#
# These options are related to distribution, mostly for the Rust project itself.
# You probably won't need to concern yourself with any of these options
# =============================================================================
[dist]

# This is the folder of artifacts that the build system will sign. All files in
# this directory will be signed with the default gpg key using the system `gpg`
# binary. The `asc` and `sha256` files will all be output into the standard dist
# output folder (currently `build/dist`)
#
# This folder should be populated ahead of time before the build system is
# invoked.
#sign-folder = "path/to/folder/to/sign"

# This is a file which contains the password of the default gpg key. This will
# be passed to `gpg` down the road when signing all files in `sign-folder`
# above. This should be stored in plaintext.
#gpg-password-file = "path/to/gpg/password"

# The remote address that all artifacts will eventually be uploaded to. The
# build system generates manifests which will point to these urls, and for the
# manifests to be correct they'll have to have the right URLs encoded.
#
# Note that this address should not contain a trailing slash as file names will
# be appended to it.
#upload-addr = "https://example.com/folder"
33 changes: 32 additions & 1 deletion src/bootstrap/dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use std::env;
use std::fs::{self, File};
use std::io::{Read, Write};
use std::path::{PathBuf, Path};
use std::process::Command;
use std::process::{Command, Stdio};

use build_helper::output;

Expand Down Expand Up @@ -876,3 +876,34 @@ fn add_env(build: &Build, cmd: &mut Command, target: &str) {
cmd.env("CFG_PLATFORM", "x86");
}
}

pub fn hash_and_sign(build: &Build) {
let compiler = Compiler::new(0, &build.config.build);
let mut cmd = build.tool_cmd(&compiler, "build-manifest");
let sign = build.config.dist_sign_folder.as_ref().unwrap_or_else(|| {
panic!("\n\nfailed to specify `dist.sign-folder` in `config.toml`\n\n")
});
let addr = build.config.dist_upload_addr.as_ref().unwrap_or_else(|| {
panic!("\n\nfailed to specify `dist.upload-addr` in `config.toml`\n\n")
});
let file = build.config.dist_gpg_password_file.as_ref().unwrap_or_else(|| {
panic!("\n\nfailed to specify `dist.gpg-password-file` in `config.toml`\n\n")
});
let mut pass = String::new();
t!(t!(File::open(&file)).read_to_string(&mut pass));

let today = output(Command::new("date").arg("+%Y-%m-%d"));

cmd.arg(sign);
cmd.arg(distdir(build));
cmd.arg(today.trim());
cmd.arg(package_vers(build));
cmd.arg(addr);

t!(fs::create_dir_all(distdir(build)));

let mut child = t!(cmd.stdin(Stdio::piped()).spawn());
t!(child.stdin.take().unwrap().write_all(pass.as_bytes()));
let status = t!(child.wait());
assert!(status.success());
}
10 changes: 10 additions & 0 deletions src/bootstrap/step.rs
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,9 @@ pub fn build_rules<'a>(build: &'a Build) -> Rules {
rules.build("tool-compiletest", "src/tools/compiletest")
.dep(|s| s.name("libtest"))
.run(move |s| compile::tool(build, s.stage, s.target, "compiletest"));
rules.build("tool-build-manifest", "src/tools/build-manifest")
.dep(|s| s.name("libstd"))
.run(move |s| compile::tool(build, s.stage, s.target, "build-manifest"));

// ========================================================================
// Documentation targets
Expand Down Expand Up @@ -633,6 +636,13 @@ pub fn build_rules<'a>(build: &'a Build) -> Rules {
.dep(|d| d.name("dist-cargo"))
.run(move |s| dist::extended(build, s.stage, s.target));

rules.dist("dist-sign", "hash-and-sign")
.host(true)
.only_build(true)
.only_host_build(true)
.dep(move |s| s.name("tool-build-manifest").target(&build.config.build).stage(0))
.run(move |_| dist::hash_and_sign(build));

rules.verify();
return rules;
}
Expand Down
2 changes: 1 addition & 1 deletion src/doc/book/ffi.md
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@ Please note that [`catch_unwind()`] will only catch unwinding panics, not
those who abort the process. See the documentation of [`catch_unwind()`]
for more information.

[`catch_unwind()`]: https://doc.rust-lang.org/std/panic/fn.catch_unwind.html
[`catch_unwind()`]: ../std/panic/fn.catch_unwind.html

# Representing opaque structs

Expand Down
6 changes: 3 additions & 3 deletions src/doc/nomicon/destructors.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ this is totally fine.
For instance, a custom implementation of `Box` might write `Drop` like this:

```rust
#![feature(alloc, heap_api, drop_in_place, unique)]
#![feature(alloc, heap_api, unique)]

extern crate alloc;

Expand Down Expand Up @@ -57,7 +57,7 @@ use-after-free the `ptr` because when drop exits, it becomes inaccessible.
However this wouldn't work:

```rust
#![feature(alloc, heap_api, drop_in_place, unique)]
#![feature(alloc, heap_api, unique)]

extern crate alloc;

Expand Down Expand Up @@ -135,7 +135,7 @@ The classic safe solution to overriding recursive drop and allowing moving out
of Self during `drop` is to use an Option:

```rust
#![feature(alloc, heap_api, drop_in_place, unique)]
#![feature(alloc, heap_api, unique)]

extern crate alloc;

Expand Down
2 changes: 1 addition & 1 deletion src/liballoc/arc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const MAX_REFCOUNT: usize = (isize::MAX) as usize;
/// as long as `T` implements [`Send`] and [`Sync`][sync]. The disadvantage is
/// that atomic operations are more expensive than ordinary memory accesses.
/// If you are not sharing reference-counted values between threads, consider
/// using [`rc::Rc`] for lower overhead. [`Rc`] is a safe default, because
/// using [`rc::Rc`][`Rc`] for lower overhead. [`Rc`] is a safe default, because
/// the compiler will catch any attempt to send an [`Rc`] between threads.
/// However, a library might choose `Arc` in order to give library consumers
/// more flexibility.
Expand Down
2 changes: 2 additions & 0 deletions src/libcollections/enum_set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
reason = "matches collection reform specification, \
waiting for dust to settle",
issue = "37966")]
#![rustc_deprecated(since = "1.16.0", reason = "long since replaced")]
#![allow(deprecated)]

use core::marker;
use core::fmt;
Expand Down
1 change: 1 addition & 0 deletions src/libcollections/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ pub use btree_set::BTreeSet;
#[doc(no_inline)]
pub use linked_list::LinkedList;
#[doc(no_inline)]
#[allow(deprecated)]
pub use enum_set::EnumSet;
#[doc(no_inline)]
pub use vec_deque::VecDeque;
Expand Down
4 changes: 2 additions & 2 deletions src/libcollections/slice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ impl<T> [T] {
core_slice::SliceExt::swap(self, a, b)
}

/// Reverse the order of elements in a slice, in place.
/// Reverses the order of elements in a slice, in place.
///
/// # Example
///
Expand Down Expand Up @@ -1062,7 +1062,7 @@ impl<T> [T] {
core_slice::SliceExt::binary_search_by_key(self, b, f)
}

/// This is equivalent to `self.sort_by(|a, b| a.cmp(b))`.
/// Sorts the slice.
///
/// This sort is stable (i.e. does not reorder equal elements) and `O(n log n)` worst-case.
///
Expand Down
10 changes: 2 additions & 8 deletions src/libcollections/str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1607,7 +1607,6 @@ impl str {
/// Basic usage:
///
/// ```
/// # #![feature(str_replacen)]
/// let s = "foo foo 123 foo";
/// assert_eq!("new new 123 foo", s.replacen("foo", "new", 2));
/// assert_eq!("faa fao 123 foo", s.replacen('o', "a", 3));
Expand All @@ -1617,13 +1616,10 @@ impl str {
/// When the pattern doesn't match:
///
/// ```
/// # #![feature(str_replacen)]
/// let s = "this is old";
/// assert_eq!(s, s.replacen("cookie monster", "little lamb", 10));
/// ```
#[unstable(feature = "str_replacen",
issue = "36436",
reason = "only need to replace first N matches")]
#[stable(feature = "str_replacen", since = "1.16.0")]
pub fn replacen<'a, P: Pattern<'a>>(&'a self, pat: P, to: &str, count: usize) -> String {
// Hope to reduce the times of re-allocation
let mut result = String::with_capacity(32);
Expand Down Expand Up @@ -1795,11 +1791,9 @@ impl str {
/// Basic usage:
///
/// ```
/// #![feature(repeat_str)]
///
/// assert_eq!("abc".repeat(4), String::from("abcabcabcabc"));
/// ```
#[unstable(feature = "repeat_str", issue = "37079")]
#[stable(feature = "repeat_str", since = "1.16.0")]
pub fn repeat(&self, n: usize) -> String {
let mut s = String::with_capacity(self.len() * n);
s.extend((0..n).map(|_| self));
Expand Down
9 changes: 2 additions & 7 deletions src/libcollections/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1166,18 +1166,14 @@ impl String {
/// Basic usage:
///
/// ```
/// #![feature(insert_str)]
///
/// let mut s = String::from("bar");
///
/// s.insert_str(0, "foo");
///
/// assert_eq!("foobar", s);
/// ```
#[inline]
#[unstable(feature = "insert_str",
reason = "recent addition",
issue = "35553")]
#[stable(feature = "insert_str", since = "1.16.0")]
pub fn insert_str(&mut self, idx: usize, string: &str) {
assert!(self.is_char_boundary(idx));

Expand Down Expand Up @@ -1270,7 +1266,6 @@ impl String {
/// # Examples
///
/// ```
/// # #![feature(string_split_off)]
/// # fn main() {
/// let mut hello = String::from("Hello, World!");
/// let world = hello.split_off(7);
Expand All @@ -1279,7 +1274,7 @@ impl String {
/// # }
/// ```
#[inline]
#[unstable(feature = "string_split_off", issue = "38080")]
#[stable(feature = "string_split_off", since = "1.16.0")]
pub fn split_off(&mut self, mid: usize) -> String {
assert!(self.is_char_boundary(mid));
let other = self.vec.split_off(mid);
Expand Down
Loading