Skip to content

Commit

Permalink
Auto merge of #43114 - brson:beta-next, r=brson
Browse files Browse the repository at this point in the history
[beta] backports

- #43068
- #43043
- #42745

The pick of 143206d in cfa3b58 was not clean and needed a fair bit of surgery. It should probably be looked at closely.

Still testing locally.
  • Loading branch information
bors committed Jul 13, 2017
2 parents 4b6f4f3 + 1d4b2e2 commit 8537f4e
Show file tree
Hide file tree
Showing 13 changed files with 15 additions and 57 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
language: generic
language: shell
sudo: required
dist: trusty
services:
Expand Down
4 changes: 0 additions & 4 deletions src/doc/unstable-book/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@
- [collection_placement](library-features/collection-placement.md)
- [collections_range](library-features/collections-range.md)
- [collections](library-features/collections.md)
- [command_envs](library-features/command-envs.md)
- [compiler_builtins_lib](library-features/compiler-builtins-lib.md)
- [compiler_fences](library-features/compiler-fences.md)
- [concat_idents_macro](library-features/concat-idents-macro.md)
Expand Down Expand Up @@ -169,7 +168,6 @@
- [once_poison](library-features/once-poison.md)
- [oom](library-features/oom.md)
- [option_entry](library-features/option-entry.md)
- [osstring_shrink_to_fit](library-features/osstring-shrink-to-fit.md)
- [panic_abort](library-features/panic-abort.md)
- [panic_unwind](library-features/panic-unwind.md)
- [pattern](library-features/pattern.md)
Expand All @@ -181,7 +179,6 @@
- [rand](library-features/rand.md)
- [range_contains](library-features/range-contains.md)
- [raw](library-features/raw.md)
- [reverse_cmp_key](library-features/reverse-cmp-key.md)
- [rt](library-features/rt.md)
- [rustc_private](library-features/rustc-private.md)
- [sanitizer_runtime_lib](library-features/sanitizer-runtime-lib.md)
Expand All @@ -203,7 +200,6 @@
- [str_box_extras](library-features/str-box-extras.md)
- [str_mut_extras](library-features/str-mut-extras.md)
- [test](library-features/test.md)
- [thread_id](library-features/thread-id.md)
- [thread_local_internals](library-features/thread-local-internals.md)
- [thread_local_state](library-features/thread-local-state.md)
- [toowned_clone_into](library-features/toowned-clone-into.md)
Expand Down
7 changes: 0 additions & 7 deletions src/doc/unstable-book/src/library-features/command-envs.md

This file was deleted.

This file was deleted.

7 changes: 0 additions & 7 deletions src/doc/unstable-book/src/library-features/reverse-cmp-key.md

This file was deleted.

7 changes: 0 additions & 7 deletions src/doc/unstable-book/src/library-features/thread-id.md

This file was deleted.

9 changes: 4 additions & 5 deletions src/libcore/cmp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -335,18 +335,17 @@ impl Ordering {
/// Example usage:
///
/// ```
/// #![feature(reverse_cmp_key)]
/// use std::cmp::Reverse;
///
/// let mut v = vec![1, 2, 3, 4, 5, 6];
/// v.sort_by_key(|&num| (num > 3, Reverse(num)));
/// assert_eq!(v, vec![3, 2, 1, 6, 5, 4]);
/// ```
#[derive(PartialEq, Eq, Debug)]
#[unstable(feature = "reverse_cmp_key", issue = "40893")]
pub struct Reverse<T>(pub T);
#[stable(feature = "reverse_cmp_key", since = "1.19.0")]
pub struct Reverse<T>(#[stable(feature = "reverse_cmp_key", since = "1.19.0")] pub T);

#[unstable(feature = "reverse_cmp_key", issue = "40893")]
#[stable(feature = "reverse_cmp_key", since = "1.19.0")]
impl<T: PartialOrd> PartialOrd for Reverse<T> {
#[inline]
fn partial_cmp(&self, other: &Reverse<T>) -> Option<Ordering> {
Expand All @@ -363,7 +362,7 @@ impl<T: PartialOrd> PartialOrd for Reverse<T> {
fn gt(&self, other: &Self) -> bool { other.0 > self.0 }
}

#[unstable(feature = "reverse_cmp_key", issue = "40893")]
#[stable(feature = "reverse_cmp_key", since = "1.19.0")]
impl<T: Ord> Ord for Reverse<T> {
#[inline]
fn cmp(&self, other: &Reverse<T>) -> Ordering {
Expand Down
1 change: 0 additions & 1 deletion src/librustc_trans/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
#![feature(slice_patterns)]
#![feature(unicode)]
#![feature(conservative_impl_trait)]
#![feature(command_envs)]

#![cfg_attr(stage0, unstable(feature = "rustc_private", issue = "27812"))]
#![cfg_attr(stage0, feature(rustc_private))]
Expand Down
8 changes: 6 additions & 2 deletions src/librustdoc/markdown.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,12 @@ pub fn test(input: &str, cfgs: Vec<String>, libs: SearchPaths, externs: Externs,
true, opts, maybe_sysroot, None,
Some(input.to_owned()),
render_type);
old_find_testable_code(&input_str, &mut collector, DUMMY_SP);
find_testable_code(&input_str, &mut collector, DUMMY_SP);
if render_type == RenderType::Pulldown {
old_find_testable_code(&input_str, &mut collector, DUMMY_SP);
find_testable_code(&input_str, &mut collector, DUMMY_SP);
} else {
old_find_testable_code(&input_str, &mut collector, DUMMY_SP);
}
test_args.insert(0, "rustdoctest".to_string());
testing::test_main(&test_args, collector.tests,
testing::Options::new().display_output(display_warnings));
Expand Down
4 changes: 1 addition & 3 deletions src/libstd/ffi/os_str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,6 @@ impl OsString {
/// # Examples
///
/// ```
/// #![feature(osstring_shrink_to_fit)]
///
/// use std::ffi::OsString;
///
/// let mut s = OsString::from("foo");
Expand All @@ -242,7 +240,7 @@ impl OsString {
/// s.shrink_to_fit();
/// assert_eq!(3, s.capacity());
/// ```
#[unstable(feature = "osstring_shrink_to_fit", issue = "40421")]
#[stable(feature = "osstring_shrink_to_fit", since = "1.19.0")]
pub fn shrink_to_fit(&mut self) {
self.inner.shrink_to_fit()
}
Expand Down
4 changes: 1 addition & 3 deletions src/libstd/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -440,8 +440,6 @@ impl Command {
/// Basic usage:
///
/// ```no_run
/// #![feature(command_envs)]
///
/// use std::process::{Command, Stdio};
/// use std::env;
/// use std::collections::HashMap;
Expand All @@ -459,7 +457,7 @@ impl Command {
/// .spawn()
/// .expect("printenv failed to start");
/// ```
#[unstable(feature = "command_envs", issue = "38526")]
#[stable(feature = "command_envs", since = "1.19.0")]
pub fn envs<I, K, V>(&mut self, vars: I) -> &mut Command
where I: IntoIterator<Item=(K, V)>, K: AsRef<OsStr>, V: AsRef<OsStr>
{
Expand Down
10 changes: 2 additions & 8 deletions src/libstd/thread/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -821,8 +821,6 @@ pub fn park_timeout(dur: Duration) {
/// # Examples
///
/// ```
/// #![feature(thread_id)]
///
/// use std::thread;
///
/// let other_thread = thread::spawn(|| {
Expand All @@ -832,7 +830,7 @@ pub fn park_timeout(dur: Duration) {
/// let other_thread_id = other_thread.join().unwrap();
/// assert!(thread::current().id() != other_thread_id);
/// ```
#[unstable(feature = "thread_id", issue = "21507")]
#[stable(feature = "thread_id", since = "1.19.0")]
#[derive(Eq, PartialEq, Clone, Copy, Hash, Debug)]
pub struct ThreadId(u64);

Expand Down Expand Up @@ -962,8 +960,6 @@ impl Thread {
/// # Examples
///
/// ```
/// #![feature(thread_id)]
///
/// use std::thread;
///
/// let other_thread = thread::spawn(|| {
Expand All @@ -973,7 +969,7 @@ impl Thread {
/// let other_thread_id = other_thread.join().unwrap();
/// assert!(thread::current().id() != other_thread_id);
/// ```
#[unstable(feature = "thread_id", issue = "21507")]
#[stable(feature = "thread_id", since = "1.19.0")]
pub fn id(&self) -> ThreadId {
self.inner.id
}
Expand Down Expand Up @@ -1164,8 +1160,6 @@ impl<T> JoinHandle<T> {
/// # Examples
///
/// ```
/// #![feature(thread_id)]
///
/// use std::thread;
///
/// let builder = thread::Builder::new();
Expand Down
2 changes: 0 additions & 2 deletions src/test/run-pass/process-envs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@

// ignore-emscripten

#![feature(command_envs)]

use std::process::Command;
use std::env;
use std::collections::HashMap;
Expand Down

0 comments on commit 8537f4e

Please sign in to comment.