Skip to content

Commit e1c29d1

Browse files
committed
Auto merge of rust-lang#112739 - matthiaskrgr:rollup-8cfggml, r=matthiaskrgr
Rollup of 6 pull requests Successful merges: - rust-lang#112352 (Fix documentation build on FreeBSD) - rust-lang#112644 (Correct types in method descriptions of `NonZero*` types) - rust-lang#112683 (fix ICE on specific malformed asm clobber_abi) - rust-lang#112707 ([rustdoc] Fix invalid handling of "going back in history" when "go to only search result" setting is enabled) - rust-lang#112719 (Replace fvdl with ffx, allow test without install) - rust-lang#112728 (Add `<meta charset="utf-8">` to `-Zdump-mir-spanview` output) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 7513407 + 981a2a2 commit e1c29d1

File tree

16 files changed

+355
-287
lines changed

16 files changed

+355
-287
lines changed

compiler/rustc_builtin_macros/src/asm.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -379,16 +379,12 @@ fn parse_clobber_abi<'a>(p: &mut Parser<'a>, args: &mut AsmArgs) -> PResult<'a,
379379
}
380380

381381
let mut new_abis = Vec::new();
382-
loop {
382+
while !p.eat(&token::CloseDelim(Delimiter::Parenthesis)) {
383383
match p.parse_str_lit() {
384384
Ok(str_lit) => {
385385
new_abis.push((str_lit.symbol_unescaped, str_lit.span));
386386
}
387387
Err(opt_lit) => {
388-
// If the non-string literal is a closing paren then it's the end of the list and is fine
389-
if p.eat(&token::CloseDelim(Delimiter::Parenthesis)) {
390-
break;
391-
}
392388
let span = opt_lit.map_or(p.token.span, |lit| lit.span);
393389
let mut err =
394390
p.sess.span_diagnostic.struct_span_err(span, "expected string literal");

compiler/rustc_middle/src/mir/spanview.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ const ANNOTATION_LEFT_BRACKET: char = '\u{298a}'; // Unicode `Z NOTATION RIGHT B
1515
const ANNOTATION_RIGHT_BRACKET: char = '\u{2989}'; // Unicode `Z NOTATION LEFT BINDING BRACKET`
1616
const NEW_LINE_SPAN: &str = "</span>\n<span class=\"line\">";
1717
const HEADER: &str = r#"<!DOCTYPE html>
18-
<html>
19-
<head>"#;
18+
<html lang="en">
19+
<head>
20+
<meta charset="utf-8">"#;
2021
const START_BODY: &str = r#"</head>
2122
<body>"#;
2223
const FOOTER: &str = r#"</body>

library/core/src/num/nonzero.rs

+12-9
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ macro_rules! nonzero_unsigned_operations {
348348
}
349349

350350
/// Adds an unsigned integer to a non-zero value.
351-
#[doc = concat!("Return [`", stringify!($Int), "::MAX`] on overflow.")]
351+
#[doc = concat!("Return [`", stringify!($Ty), "::MAX`] on overflow.")]
352352
///
353353
/// # Examples
354354
///
@@ -579,7 +579,7 @@ macro_rules! nonzero_signed_operations {
579579

580580
/// Checked absolute value.
581581
/// Checks for overflow and returns [`None`] if
582-
#[doc = concat!("`self == ", stringify!($Int), "::MIN`.")]
582+
#[doc = concat!("`self == ", stringify!($Ty), "::MIN`.")]
583583
/// The result cannot be zero.
584584
///
585585
/// # Example
@@ -800,7 +800,8 @@ macro_rules! nonzero_signed_operations {
800800
self.get().is_negative()
801801
}
802802

803-
/// Checked negation. Computes `-self`, returning `None` if `self == i32::MIN`.
803+
/// Checked negation. Computes `-self`,
804+
#[doc = concat!("returning `None` if `self == ", stringify!($Ty), "::MIN`.")]
804805
///
805806
/// # Example
806807
///
@@ -859,8 +860,10 @@ macro_rules! nonzero_signed_operations {
859860
((unsafe { $Ty::new_unchecked(result) }), overflow)
860861
}
861862

862-
/// Saturating negation. Computes `-self`, returning `MAX` if
863-
/// `self == i32::MIN` instead of overflowing.
863+
/// Saturating negation. Computes `-self`,
864+
#[doc = concat!("returning [`", stringify!($Ty), "::MAX`]")]
865+
#[doc = concat!("if `self == ", stringify!($Ty), "::MIN`")]
866+
/// instead of overflowing.
864867
///
865868
/// # Example
866869
///
@@ -993,7 +996,7 @@ macro_rules! nonzero_unsigned_signed_operations {
993996
}
994997

995998
/// Multiplies two non-zero integers together.
996-
#[doc = concat!("Return [`", stringify!($Int), "::MAX`] on overflow.")]
999+
#[doc = concat!("Return [`", stringify!($Ty), "::MAX`] on overflow.")]
9971000
///
9981001
/// # Examples
9991002
///
@@ -1102,11 +1105,11 @@ macro_rules! nonzero_unsigned_signed_operations {
11021105
#[doc = sign_dependent_expr!{
11031106
$signedness ?
11041107
if signed {
1105-
concat!("Return [`", stringify!($Int), "::MIN`] ",
1106-
"or [`", stringify!($Int), "::MAX`] on overflow.")
1108+
concat!("Return [`", stringify!($Ty), "::MIN`] ",
1109+
"or [`", stringify!($Ty), "::MAX`] on overflow.")
11071110
}
11081111
if unsigned {
1109-
concat!("Return [`", stringify!($Int), "::MAX`] on overflow.")
1112+
concat!("Return [`", stringify!($Ty), "::MAX`] on overflow.")
11101113
}
11111114
}]
11121115
///

library/std/src/os/unix/net/ancillary.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,13 @@ use crate::slice::from_raw_parts;
1111
use crate::sys::net::Socket;
1212

1313
// FIXME(#43348): Make libc adapt #[doc(cfg(...))] so we don't need these fake definitions here?
14-
#[cfg(all(doc, not(target_os = "linux"), not(target_os = "android"), not(target_os = "netbsd")))]
14+
#[cfg(all(
15+
doc,
16+
not(target_os = "linux"),
17+
not(target_os = "android"),
18+
not(target_os = "netbsd"),
19+
not(target_os = "freebsd")
20+
))]
1521
#[allow(non_camel_case_types)]
1622
mod libc {
1723
pub use libc::c_int;

0 commit comments

Comments
 (0)