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 4 pull requests #74831

Merged
merged 16 commits into from
Jul 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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: 3 additions & 10 deletions src/bootstrap/bin/rustc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ fn main() {
e => e,
};
println!("\nDid not run successfully: {:?}\n{:?}\n-------------", e, cmd);
exec_cmd(&mut on_fail).expect("could not run the backup command");
status_code(&mut on_fail).expect("could not run the backup command");
std::process::exit(1);
}

Expand Down Expand Up @@ -182,17 +182,10 @@ fn main() {
}
}

let code = exec_cmd(&mut cmd).unwrap_or_else(|_| panic!("\n\n failed to run {:?}", cmd));
let code = status_code(&mut cmd).unwrap_or_else(|_| panic!("\n\n failed to run {:?}", cmd));
std::process::exit(code);
}

#[cfg(unix)]
fn exec_cmd(cmd: &mut Command) -> io::Result<i32> {
use std::os::unix::process::CommandExt;
Err(cmd.exec())
}

#[cfg(not(unix))]
fn exec_cmd(cmd: &mut Command) -> io::Result<i32> {
fn status_code(cmd: &mut Command) -> io::Result<i32> {
cmd.status().map(|status| status.code().unwrap())
}
20 changes: 10 additions & 10 deletions src/libcore/char/methods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1226,7 +1226,7 @@ impl char {
/// assert!(!esc.is_ascii_alphabetic());
/// ```
#[stable(feature = "ascii_ctype_on_intrinsics", since = "1.24.0")]
#[rustc_const_unstable(feature = "const_ascii_ctype_on_intrinsics", issue = "68983")]
#[rustc_const_stable(feature = "const_ascii_ctype_on_intrinsics", since = "1.47.0")]
#[inline]
pub const fn is_ascii_alphabetic(&self) -> bool {
match *self {
Expand Down Expand Up @@ -1262,7 +1262,7 @@ impl char {
/// assert!(!esc.is_ascii_uppercase());
/// ```
#[stable(feature = "ascii_ctype_on_intrinsics", since = "1.24.0")]
#[rustc_const_unstable(feature = "const_ascii_ctype_on_intrinsics", issue = "68983")]
#[rustc_const_stable(feature = "const_ascii_ctype_on_intrinsics", since = "1.47.0")]
#[inline]
pub const fn is_ascii_uppercase(&self) -> bool {
match *self {
Expand Down Expand Up @@ -1298,7 +1298,7 @@ impl char {
/// assert!(!esc.is_ascii_lowercase());
/// ```
#[stable(feature = "ascii_ctype_on_intrinsics", since = "1.24.0")]
#[rustc_const_unstable(feature = "const_ascii_ctype_on_intrinsics", issue = "68983")]
#[rustc_const_stable(feature = "const_ascii_ctype_on_intrinsics", since = "1.47.0")]
#[inline]
pub const fn is_ascii_lowercase(&self) -> bool {
match *self {
Expand Down Expand Up @@ -1337,7 +1337,7 @@ impl char {
/// assert!(!esc.is_ascii_alphanumeric());
/// ```
#[stable(feature = "ascii_ctype_on_intrinsics", since = "1.24.0")]
#[rustc_const_unstable(feature = "const_ascii_ctype_on_intrinsics", issue = "68983")]
#[rustc_const_stable(feature = "const_ascii_ctype_on_intrinsics", since = "1.47.0")]
#[inline]
pub const fn is_ascii_alphanumeric(&self) -> bool {
match *self {
Expand Down Expand Up @@ -1373,7 +1373,7 @@ impl char {
/// assert!(!esc.is_ascii_digit());
/// ```
#[stable(feature = "ascii_ctype_on_intrinsics", since = "1.24.0")]
#[rustc_const_unstable(feature = "const_ascii_ctype_on_intrinsics", issue = "68983")]
#[rustc_const_stable(feature = "const_ascii_ctype_on_intrinsics", since = "1.47.0")]
#[inline]
pub const fn is_ascii_digit(&self) -> bool {
match *self {
Expand Down Expand Up @@ -1412,7 +1412,7 @@ impl char {
/// assert!(!esc.is_ascii_hexdigit());
/// ```
#[stable(feature = "ascii_ctype_on_intrinsics", since = "1.24.0")]
#[rustc_const_unstable(feature = "const_ascii_ctype_on_intrinsics", issue = "68983")]
#[rustc_const_stable(feature = "const_ascii_ctype_on_intrinsics", since = "1.47.0")]
#[inline]
pub const fn is_ascii_hexdigit(&self) -> bool {
match *self {
Expand Down Expand Up @@ -1452,7 +1452,7 @@ impl char {
/// assert!(!esc.is_ascii_punctuation());
/// ```
#[stable(feature = "ascii_ctype_on_intrinsics", since = "1.24.0")]
#[rustc_const_unstable(feature = "const_ascii_ctype_on_intrinsics", issue = "68983")]
#[rustc_const_stable(feature = "const_ascii_ctype_on_intrinsics", since = "1.47.0")]
#[inline]
pub const fn is_ascii_punctuation(&self) -> bool {
match *self {
Expand Down Expand Up @@ -1488,7 +1488,7 @@ impl char {
/// assert!(!esc.is_ascii_graphic());
/// ```
#[stable(feature = "ascii_ctype_on_intrinsics", since = "1.24.0")]
#[rustc_const_unstable(feature = "const_ascii_ctype_on_intrinsics", issue = "68983")]
#[rustc_const_stable(feature = "const_ascii_ctype_on_intrinsics", since = "1.47.0")]
#[inline]
pub const fn is_ascii_graphic(&self) -> bool {
match *self {
Expand Down Expand Up @@ -1541,7 +1541,7 @@ impl char {
/// assert!(!esc.is_ascii_whitespace());
/// ```
#[stable(feature = "ascii_ctype_on_intrinsics", since = "1.24.0")]
#[rustc_const_unstable(feature = "const_ascii_ctype_on_intrinsics", issue = "68983")]
#[rustc_const_stable(feature = "const_ascii_ctype_on_intrinsics", since = "1.47.0")]
#[inline]
pub const fn is_ascii_whitespace(&self) -> bool {
match *self {
Expand Down Expand Up @@ -1579,7 +1579,7 @@ impl char {
/// assert!(esc.is_ascii_control());
/// ```
#[stable(feature = "ascii_ctype_on_intrinsics", since = "1.24.0")]
#[rustc_const_unstable(feature = "const_ascii_ctype_on_intrinsics", issue = "68983")]
#[rustc_const_stable(feature = "const_ascii_ctype_on_intrinsics", since = "1.47.0")]
#[inline]
pub const fn is_ascii_control(&self) -> bool {
match *self {
Expand Down
2 changes: 0 additions & 2 deletions src/libcore/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,11 @@
#![feature(bound_cloned)]
#![feature(cfg_target_has_atomic)]
#![feature(concat_idents)]
#![feature(const_ascii_ctype_on_intrinsics)]
#![feature(const_alloc_layout)]
#![feature(const_discriminant)]
#![feature(const_checked_int_methods)]
#![feature(const_euclidean_int_methods)]
#![feature(const_overflowing_int_methods)]
#![feature(const_saturating_int_methods)]
#![feature(const_int_unchecked_arith)]
#![feature(const_int_pow)]
#![feature(constctlz)]
Expand Down
Loading