Skip to content

Commit

Permalink
Auto merge of #53297 - GuillaumeGomez:rollup, r=GuillaumeGomez
Browse files Browse the repository at this point in the history
Rollup of 15 pull requests

Successful merges:

 - #52955 (Update compiler test documentation)
 - #53019 (Don't collect() when size_hint is useless)
 - #53025 (Consider changing assert! to debug_assert! when it calls visit_with)
 - #53059 (Remove explicit returns where unnecessary)
 - #53165 ( Add aarch64-unknown-netbsd target)
 - #53210 (Deny future duplication of rustc-ap-syntax)
 - #53223 (A few cleanups for rustc_data_structures)
 - #53230 ([nll] enable feature(nll) on various crates for bootstrap: part 4)
 - #53231 (Add let keyword doc)
 - #53240 (Add individual documentation for <integer>`.swap_bytes`/.`reverse_bits`)
 - #53253 (Remove unwanted console log)
 - #53264 (Show that Command can be reused and remodified)
 - #53267 (Fix styles)
 - #53273 (Add links to std::char::REPLACEMENT_CHARACTER from docs.)
 - #53283 (wherein we suggest float for integer literals where a float was expected)

Failed merges:

r? @ghost
  • Loading branch information
bors committed Aug 12, 2018
2 parents 0aa8d03 + 3959dca commit 5a0d296
Show file tree
Hide file tree
Showing 72 changed files with 465 additions and 405 deletions.
1 change: 1 addition & 0 deletions src/bootstrap/native.rs
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,7 @@ impl Step for Openssl {
"aarch64-linux-android" => "linux-aarch64",
"aarch64-unknown-linux-gnu" => "linux-aarch64",
"aarch64-unknown-linux-musl" => "linux-aarch64",
"aarch64-unknown-netbsd" => "BSD-generic64",
"arm-linux-androideabi" => "android",
"arm-unknown-linux-gnueabi" => "linux-armv4",
"arm-unknown-linux-gnueabihf" => "linux-armv4",
Expand Down
6 changes: 4 additions & 2 deletions src/liballoc/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -519,10 +519,11 @@ impl String {
/// between the two. Not all byte slices are valid strings, however: strings
/// are required to be valid UTF-8. During this conversion,
/// `from_utf8_lossy()` will replace any invalid UTF-8 sequences with
/// `U+FFFD REPLACEMENT CHARACTER`, which looks like this: �
/// [`U+FFFD REPLACEMENT CHARACTER`][U+FFFD], which looks like this: �
///
/// [`u8`]: ../../std/primitive.u8.html
/// [byteslice]: ../../std/primitive.slice.html
/// [U+FFFD]: ../char/constant.REPLACEMENT_CHARACTER.html
///
/// If you are sure that the byte slice is valid UTF-8, and you don't want
/// to incur the overhead of the conversion, there is an unsafe version
Expand Down Expand Up @@ -621,14 +622,15 @@ impl String {
}

/// Decode a UTF-16 encoded slice `v` into a `String`, replacing
/// invalid data with the replacement character (U+FFFD).
/// invalid data with [the replacement character (`U+FFFD`)][U+FFFD].
///
/// Unlike [`from_utf8_lossy`] which returns a [`Cow<'a, str>`],
/// `from_utf16_lossy` returns a `String` since the UTF-16 to UTF-8
/// conversion requires a memory allocation.
///
/// [`from_utf8_lossy`]: #method.from_utf8_lossy
/// [`Cow<'a, str>`]: ../borrow/enum.Cow.html
/// [U+FFFD]: ../char/constant.REPLACEMENT_CHARACTER.html
///
/// # Examples
///
Expand Down
10 changes: 5 additions & 5 deletions src/libcore/alloc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ impl Layout {

let len_rounded_up = len.wrapping_add(align).wrapping_sub(1)
& !align.wrapping_sub(1);
return len_rounded_up.wrapping_sub(len);
len_rounded_up.wrapping_sub(len)
}

/// Creates a layout describing the record for `n` instances of
Expand Down Expand Up @@ -971,9 +971,9 @@ pub unsafe trait Alloc {
// _l <= layout.size() [guaranteed by usable_size()]
// layout.size() <= new_layout.size() [required by this method]
if new_size <= u {
return Ok(());
Ok(())
} else {
return Err(CannotReallocInPlace);
Err(CannotReallocInPlace)
}
}

Expand Down Expand Up @@ -1026,9 +1026,9 @@ pub unsafe trait Alloc {
// layout.size() <= _u [guaranteed by usable_size()]
// new_layout.size() <= layout.size() [required by this method]
if l <= new_size {
return Ok(());
Ok(())
} else {
return Err(CannotReallocInPlace);
Err(CannotReallocInPlace)
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/libcore/char/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,8 @@ impl Iterator for EscapeDefault {
None
}
},
EscapeDefaultState::Done => return None,
EscapeDefaultState::Unicode(ref mut i) => return i.nth(n),
EscapeDefaultState::Done => None,
EscapeDefaultState::Unicode(ref mut i) => i.nth(n),
}
}

Expand Down
1 change: 1 addition & 0 deletions src/libcore/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
#![feature(lang_items)]
#![feature(link_llvm_intrinsics)]
#![feature(never_type)]
#![cfg_attr(not(stage0), feature(nll))]
#![feature(exhaustive_patterns)]
#![feature(macro_at_most_once_rep)]
#![feature(no_core)]
Expand Down
Loading

0 comments on commit 5a0d296

Please sign in to comment.