Skip to content

Commit 5a0d296

Browse files
committed
Auto merge of #53297 - GuillaumeGomez:rollup, r=GuillaumeGomez
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
2 parents 0aa8d03 + 3959dca commit 5a0d296

File tree

72 files changed

+465
-405
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+465
-405
lines changed

src/bootstrap/native.rs

+1
Original file line numberDiff line numberDiff line change
@@ -607,6 +607,7 @@ impl Step for Openssl {
607607
"aarch64-linux-android" => "linux-aarch64",
608608
"aarch64-unknown-linux-gnu" => "linux-aarch64",
609609
"aarch64-unknown-linux-musl" => "linux-aarch64",
610+
"aarch64-unknown-netbsd" => "BSD-generic64",
610611
"arm-linux-androideabi" => "android",
611612
"arm-unknown-linux-gnueabi" => "linux-armv4",
612613
"arm-unknown-linux-gnueabihf" => "linux-armv4",

src/liballoc/string.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -519,10 +519,11 @@ impl String {
519519
/// between the two. Not all byte slices are valid strings, however: strings
520520
/// are required to be valid UTF-8. During this conversion,
521521
/// `from_utf8_lossy()` will replace any invalid UTF-8 sequences with
522-
/// `U+FFFD REPLACEMENT CHARACTER`, which looks like this: �
522+
/// [`U+FFFD REPLACEMENT CHARACTER`][U+FFFD], which looks like this: �
523523
///
524524
/// [`u8`]: ../../std/primitive.u8.html
525525
/// [byteslice]: ../../std/primitive.slice.html
526+
/// [U+FFFD]: ../char/constant.REPLACEMENT_CHARACTER.html
526527
///
527528
/// If you are sure that the byte slice is valid UTF-8, and you don't want
528529
/// to incur the overhead of the conversion, there is an unsafe version
@@ -621,14 +622,15 @@ impl String {
621622
}
622623

623624
/// Decode a UTF-16 encoded slice `v` into a `String`, replacing
624-
/// invalid data with the replacement character (U+FFFD).
625+
/// invalid data with [the replacement character (`U+FFFD`)][U+FFFD].
625626
///
626627
/// Unlike [`from_utf8_lossy`] which returns a [`Cow<'a, str>`],
627628
/// `from_utf16_lossy` returns a `String` since the UTF-16 to UTF-8
628629
/// conversion requires a memory allocation.
629630
///
630631
/// [`from_utf8_lossy`]: #method.from_utf8_lossy
631632
/// [`Cow<'a, str>`]: ../borrow/enum.Cow.html
633+
/// [U+FFFD]: ../char/constant.REPLACEMENT_CHARACTER.html
632634
///
633635
/// # Examples
634636
///

src/libcore/alloc.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ impl Layout {
217217

218218
let len_rounded_up = len.wrapping_add(align).wrapping_sub(1)
219219
& !align.wrapping_sub(1);
220-
return len_rounded_up.wrapping_sub(len);
220+
len_rounded_up.wrapping_sub(len)
221221
}
222222

223223
/// Creates a layout describing the record for `n` instances of
@@ -971,9 +971,9 @@ pub unsafe trait Alloc {
971971
// _l <= layout.size() [guaranteed by usable_size()]
972972
// layout.size() <= new_layout.size() [required by this method]
973973
if new_size <= u {
974-
return Ok(());
974+
Ok(())
975975
} else {
976-
return Err(CannotReallocInPlace);
976+
Err(CannotReallocInPlace)
977977
}
978978
}
979979

@@ -1026,9 +1026,9 @@ pub unsafe trait Alloc {
10261026
// layout.size() <= _u [guaranteed by usable_size()]
10271027
// new_layout.size() <= layout.size() [required by this method]
10281028
if l <= new_size {
1029-
return Ok(());
1029+
Ok(())
10301030
} else {
1031-
return Err(CannotReallocInPlace);
1031+
Err(CannotReallocInPlace)
10321032
}
10331033
}
10341034

src/libcore/char/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -312,8 +312,8 @@ impl Iterator for EscapeDefault {
312312
None
313313
}
314314
},
315-
EscapeDefaultState::Done => return None,
316-
EscapeDefaultState::Unicode(ref mut i) => return i.nth(n),
315+
EscapeDefaultState::Done => None,
316+
EscapeDefaultState::Unicode(ref mut i) => i.nth(n),
317317
}
318318
}
319319

src/libcore/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@
9292
#![feature(lang_items)]
9393
#![feature(link_llvm_intrinsics)]
9494
#![feature(never_type)]
95+
#![cfg_attr(not(stage0), feature(nll))]
9596
#![feature(exhaustive_patterns)]
9697
#![feature(macro_at_most_once_rep)]
9798
#![feature(no_core)]

0 commit comments

Comments
 (0)