Skip to content

Commit 3c15a9d

Browse files
committed
Auto merge of rust-lang#140993 - jieyouxu:rollup-rb13gfl, r=jieyouxu
Rollup of 4 pull requests Successful merges: - rust-lang#140953 (Fix a compiletest blessing message) - rust-lang#140973 (Update rustix to 1.0.7 for bootstrap) - rust-lang#140976 (Add `Ipv4Addr` and `Ipv6Addr` diagnostic items) - rust-lang#140977 ([win] Use a dash instead of slash for linker to avoid breaking lld) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 414482f + 641d66c commit 3c15a9d

File tree

5 files changed

+19
-11
lines changed

5 files changed

+19
-11
lines changed

compiler/rustc_span/src/symbol.rs

+2
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,8 @@ symbols! {
280280
IoSeek,
281281
IoWrite,
282282
IpAddr,
283+
Ipv4Addr,
284+
Ipv6Addr,
283285
IrTyKind,
284286
Is,
285287
Item,

compiler/rustc_target/src/spec/targets/aarch64_pc_windows_msvc.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ pub(crate) fn target() -> Target {
1414
// MSVC emits a warning about code that may trip "Cortex-A53 MPCore processor bug #843419" (see
1515
// https://developer.arm.com/documentation/epm048406/latest) which is sometimes emitted by LLVM.
1616
// Since Arm64 Windows 10+ isn't supported on that processor, it's safe to disable the warning.
17-
base.add_pre_link_args(LinkerFlavor::Msvc(Lld::No), &["/arm64hazardfree"]);
17+
base.add_pre_link_args(LinkerFlavor::Msvc(Lld::No), &["-arm64hazardfree"]);
1818

1919
Target {
2020
llvm_target: "aarch64-pc-windows-msvc".into(),

library/core/src/net/ip_addr.rs

+2
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ pub enum IpAddr {
6868
/// assert!("0000000.0.0.0".parse::<Ipv4Addr>().is_err()); // first octet is a zero in octal
6969
/// assert!("0xcb.0x0.0x71.0x00".parse::<Ipv4Addr>().is_err()); // all octets are in hex
7070
/// ```
71+
#[rustc_diagnostic_item = "Ipv4Addr"]
7172
#[derive(Copy, Clone, PartialEq, Eq)]
7273
#[stable(feature = "rust1", since = "1.0.0")]
7374
pub struct Ipv4Addr {
@@ -160,6 +161,7 @@ impl Hash for Ipv4Addr {
160161
/// assert_eq!("::1".parse(), Ok(localhost));
161162
/// assert_eq!(localhost.is_loopback(), true);
162163
/// ```
164+
#[rustc_diagnostic_item = "Ipv6Addr"]
163165
#[derive(Copy, Clone, PartialEq, Eq)]
164166
#[stable(feature = "rust1", since = "1.0.0")]
165167
pub struct Ipv6Addr {

src/bootstrap/Cargo.lock

+2-2
Original file line numberDiff line numberDiff line change
@@ -579,9 +579,9 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c"
579579

580580
[[package]]
581581
name = "rustix"
582-
version = "1.0.2"
582+
version = "1.0.7"
583583
source = "registry+https://github.com/rust-lang/crates.io-index"
584-
checksum = "f7178faa4b75a30e269c71e61c353ce2748cf3d76f0c44c393f4e60abf49b825"
584+
checksum = "c71e83d6afe7ff64890ec6b71d6a69bb8a610ab78ce364b3352876bb4c801266"
585585
dependencies = [
586586
"bitflags",
587587
"errno",

src/tools/compiletest/src/runtest.rs

+12-8
Original file line numberDiff line numberDiff line change
@@ -2609,18 +2609,19 @@ impl<'test> TestCx<'test> {
26092609
(expected, actual)
26102610
};
26112611

2612-
// Write the actual output to a file in build/
2613-
let test_name = self.config.compare_mode.as_ref().map_or("", |m| m.to_str());
2612+
// Write the actual output to a file in build directory.
26142613
let actual_path = self
26152614
.output_base_name()
26162615
.with_extra_extension(self.revision.unwrap_or(""))
2617-
.with_extra_extension(test_name)
2616+
.with_extra_extension(
2617+
self.config.compare_mode.as_ref().map(|cm| cm.to_str()).unwrap_or(""),
2618+
)
26182619
.with_extra_extension(stream);
26192620

26202621
if let Err(err) = fs::write(&actual_path, &actual) {
2621-
self.fatal(&format!("failed to write {stream} to `{actual_path:?}`: {err}",));
2622+
self.fatal(&format!("failed to write {stream} to `{actual_path}`: {err}",));
26222623
}
2623-
println!("Saved the actual {stream} to {actual_path:?}");
2624+
println!("Saved the actual {stream} to `{actual_path}`");
26242625

26252626
if !self.config.bless {
26262627
if expected.is_empty() {
@@ -2646,13 +2647,16 @@ impl<'test> TestCx<'test> {
26462647

26472648
if !actual.is_empty() {
26482649
if let Err(err) = fs::write(&expected_path, &actual) {
2649-
self.fatal(&format!("failed to write {stream} to `{expected_path:?}`: {err}"));
2650+
self.fatal(&format!("failed to write {stream} to `{expected_path}`: {err}"));
26502651
}
2651-
println!("Blessing the {stream} of {test_name} in {expected_path:?}");
2652+
println!(
2653+
"Blessing the {stream} of `{test_name}` as `{expected_path}`",
2654+
test_name = self.testpaths.file
2655+
);
26522656
}
26532657
}
26542658

2655-
println!("\nThe actual {0} differed from the expected {0}.", stream);
2659+
println!("\nThe actual {stream} differed from the expected {stream}");
26562660

26572661
if self.config.bless { CompareOutcome::Blessed } else { CompareOutcome::Differed }
26582662
}

0 commit comments

Comments
 (0)