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 5 pull requests #46225

Merged
merged 10 commits into from
Nov 24, 2017
9 changes: 8 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
Version 1.22.0 (2017-11-23)
Version 1.22.1 (2017-11-22)
==========================

- [Update Cargo to fix an issue with macOS 10.13 "High Sierra"][46183]

[46183]: https://github.com/rust-lang/rust/pull/46183

Version 1.22.0 (2017-11-22)
==========================

Language
Expand Down
18 changes: 9 additions & 9 deletions src/liballoc/slice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1468,9 +1468,9 @@ impl<T> [T] {
core_slice::SliceExt::copy_from_slice(self, src)
}

/// Swaps all elements in `self` with those in `src`.
/// Swaps all elements in `self` with those in `other`.
///
/// The length of `src` must be the same as `self`.
/// The length of `other` must be the same as `self`.
///
/// # Panics
///
Expand All @@ -1481,16 +1481,16 @@ impl<T> [T] {
/// ```
/// #![feature(swap_with_slice)]
///
/// let mut src = [1, 2, 3];
/// let mut dst = [7, 8, 9];
/// let mut slice1 = [1, 2, 3];
/// let mut slice2 = [7, 8, 9];
///
/// src.swap_with_slice(&mut dst);
/// assert_eq!(src, [7, 8, 9]);
/// assert_eq!(dst, [1, 2, 3]);
/// slice1.swap_with_slice(&mut slice2);
/// assert_eq!(slice1, [7, 8, 9]);
/// assert_eq!(slice2, [1, 2, 3]);
/// ```
#[unstable(feature = "swap_with_slice", issue = "44030")]
pub fn swap_with_slice(&mut self, src: &mut [T]) {
core_slice::SliceExt::swap_with_slice(self, src)
pub fn swap_with_slice(&mut self, other: &mut [T]) {
core_slice::SliceExt::swap_with_slice(self, other)
}

/// Copies `self` into a new `Vec`.
Expand Down
6 changes: 4 additions & 2 deletions src/libstd/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -712,8 +712,10 @@ impl Command {
/// Executes the command as a child process, waiting for it to finish and
/// collecting all of its output.
///
/// By default, stdin, stdout and stderr are captured (and used to
/// provide the resulting output).
/// By default, stdout and stderr are captured (and used to provide the
/// resulting output). Stdin is not inherited from the parent and any
/// attempt by the child process to read from the stdin stream will result
/// in the stream immediately closing.
///
/// # Examples
///
Expand Down
5 changes: 4 additions & 1 deletion src/libstd_unicode/char.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ pub use tables::{UnicodeVersion, UNICODE_VERSION};
/// [`to_lowercase`]: ../../std/primitive.char.html#method.to_lowercase
/// [`char`]: ../../std/primitive.char.html
#[stable(feature = "rust1", since = "1.0.0")]
#[derive(Debug)]
pub struct ToLowercase(CaseMappingIter);

#[stable(feature = "rust1", since = "1.0.0")]
Expand All @@ -78,6 +79,7 @@ impl FusedIterator for ToLowercase {}
/// [`to_uppercase`]: ../../std/primitive.char.html#method.to_uppercase
/// [`char`]: ../../std/primitive.char.html
#[stable(feature = "rust1", since = "1.0.0")]
#[derive(Debug)]
pub struct ToUppercase(CaseMappingIter);

#[stable(feature = "rust1", since = "1.0.0")]
Expand All @@ -91,6 +93,7 @@ impl Iterator for ToUppercase {
#[unstable(feature = "fused", issue = "35602")]
impl FusedIterator for ToUppercase {}

#[derive(Debug)]
enum CaseMappingIter {
Three(char, char, char),
Two(char, char),
Expand Down Expand Up @@ -1450,7 +1453,7 @@ impl char {

/// An iterator that decodes UTF-16 encoded code points from an iterator of `u16`s.
#[stable(feature = "decode_utf16", since = "1.9.0")]
#[derive(Clone)]
#[derive(Clone, Debug)]
pub struct DecodeUtf16<I>
where I: Iterator<Item = u16>
{
Expand Down
1 change: 1 addition & 0 deletions src/libstd_unicode/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
issue_tracker_base_url = "https://github.com/rust-lang/rust/issues/",
test(no_crate_inject, attr(allow(unused_variables), deny(warnings))))]
#![deny(warnings)]
#![deny(missing_debug_implementations)]
#![no_std]

#![feature(ascii_ctype)]
Expand Down
1 change: 1 addition & 0 deletions src/libstd_unicode/lossy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ impl Utf8Lossy {

/// Iterator over lossy UTF-8 string
#[unstable(feature = "str_internals", issue = "0")]
#[allow(missing_debug_implementations)]
pub struct Utf8LossyChunksIter<'a> {
source: &'a [u8],
}
Expand Down
1 change: 1 addition & 0 deletions src/libstd_unicode/u_str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ impl UnicodeStr for str {

/// Iterator adaptor for encoding `char`s to UTF-16.
#[derive(Clone)]
#[allow(missing_debug_implementations)]
pub struct Utf16Encoder<I> {
chars: I,
extra: u16,
Expand Down
20 changes: 20 additions & 0 deletions src/test/ui-fulldeps/issue-44953/issue-44953.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
//


#![feature(proc_macro)]
#![allow(unused_macros)]

#[macro_use] extern crate log;

pub fn main() {
info!("This is a log message.");
}
19 changes: 19 additions & 0 deletions src/test/ui-fulldeps/issue-44953/issue-44953.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
error: use of unstable library feature 'rustc_private': this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via `Cargo.toml` instead? (see issue #27812)
--> $DIR/issue-44953.rs:16:14
|
16 | #[macro_use] extern crate log;
| ^^^^^^^^^^^^^^^^^
|
= help: add #![feature(rustc_private)] to the crate attributes to enable

error: use of unstable library feature 'rustc_private': this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via `Cargo.toml` instead? (see issue #27812)
--> $DIR/issue-44953.rs:19:5
|
19 | info!("This is a log message.");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: add #![feature(rustc_private)] to the crate attributes to enable
= note: this error originates in a macro outside of the current crate (run with -Z external-macro-backtrace for more info)

error: aborting due to 2 previous errors