From 5e76e20d7168cf35f0aa08d34c1d7b78b5263228 Mon Sep 17 00:00:00 2001 From: Tobias Bucher Date: Fri, 25 Aug 2023 03:54:28 +0200 Subject: [PATCH 1/5] Remove special cases that are no longer needed due to #112606 --- library/core/src/net/ip_addr.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/library/core/src/net/ip_addr.rs b/library/core/src/net/ip_addr.rs index 56460c75eba9d..6a36dfec098c7 100644 --- a/library/core/src/net/ip_addr.rs +++ b/library/core/src/net/ip_addr.rs @@ -1856,13 +1856,7 @@ impl fmt::Display for Ipv6Addr { if f.precision().is_none() && f.width().is_none() { let segments = self.segments(); - // Special case for :: and ::1; otherwise they get written with the - // IPv4 formatter - if self.is_unspecified() { - f.write_str("::") - } else if self.is_loopback() { - f.write_str("::1") - } else if let Some(ipv4) = self.to_ipv4_mapped() { + if let Some(ipv4) = self.to_ipv4_mapped() { write!(f, "::ffff:{}", ipv4) } else { #[derive(Copy, Clone, Default)] From 6ec570aca510597ca940e9ffbd60370bfcbc4562 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Curley?= Date: Fri, 25 Aug 2023 13:00:54 +0100 Subject: [PATCH 2/5] Make `rustc_on_unimplemented` std-agnostic for `alloc::rc` --- library/core/src/marker.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/library/core/src/marker.rs b/library/core/src/marker.rs index aec287226a055..ec1810234eb09 100644 --- a/library/core/src/marker.rs +++ b/library/core/src/marker.rs @@ -77,6 +77,7 @@ macro marker_impls { #[cfg_attr(not(test), rustc_diagnostic_item = "Send")] #[rustc_on_unimplemented( on(_Self = "std::rc::Rc", note = "use `std::sync::Arc` instead of `std::rc::Rc`"), + on(_Self = "alloc::rc::Rc", note = "use `alloc::sync::Arc` instead of `alloc::rc::Rc`"), message = "`{Self}` cannot be sent between threads safely", label = "`{Self}` cannot be sent between threads safely", note = "consider using `std::sync::Arc<{Self}>`; for more information visit \ @@ -632,6 +633,7 @@ impl Copy for &T {} note = "if you want to do aliasing and mutation between multiple threads, use `std::sync::RwLock` instead", ), on(_Self = "std::rc::Rc", note = "use `std::sync::Arc` instead of `std::rc::Rc`"), + on(_Self = "alloc::rc::Rc", note = "use `alloc::sync::Arc` instead of `alloc::rc::Rc`"), message = "`{Self}` cannot be shared between threads safely", label = "`{Self}` cannot be shared between threads safely", note = "consider using `std::sync::Arc<{Self}>`; for more information visit \ From 0f33bb0a75c5847cb62a1e9cdfd19fb0ef0a790f Mon Sep 17 00:00:00 2001 From: Jubilee Young Date: Fri, 25 Aug 2023 21:40:18 -0700 Subject: [PATCH 3/5] Fixup sparc-unknown-none-elf table spacing --- src/doc/rustc/src/platform-support.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/doc/rustc/src/platform-support.md b/src/doc/rustc/src/platform-support.md index 7cc17e11bdb86..c1614d02f347b 100644 --- a/src/doc/rustc/src/platform-support.md +++ b/src/doc/rustc/src/platform-support.md @@ -313,7 +313,7 @@ target | std | host | notes [`riscv64-linux-android`](platform-support/android.md) | | | RISC-V 64-bit Android `s390x-unknown-linux-musl` | | | S390x Linux (kernel 3.2, MUSL) `sparc-unknown-linux-gnu` | ✓ | | 32-bit SPARC Linux -[`sparc-unknown-none-elf`](./platform-support/sparc-unknown-none-elf.md) | * | Bare 32-bit SPARC V7+ +[`sparc-unknown-none-elf`](./platform-support/sparc-unknown-none-elf.md) | * | | Bare 32-bit SPARC V7+ [`sparc64-unknown-netbsd`](platform-support/netbsd.md) | ✓ | ✓ | NetBSD/sparc64 [`sparc64-unknown-openbsd`](platform-support/openbsd.md) | ✓ | ✓ | OpenBSD/sparc64 `thumbv4t-none-eabi` | * | | Thumb-mode Bare ARMv4T From e55ad9b0eb117cd8223541d57a9a44f0ec212930 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Thu, 24 Aug 2023 17:42:31 +0200 Subject: [PATCH 4/5] Migrate GUI colors test to original CSS color format --- tests/rustdoc-gui/warning-block.goml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/rustdoc-gui/warning-block.goml b/tests/rustdoc-gui/warning-block.goml index 2a935bd1a9bb5..ce75fb58bc1e0 100644 --- a/tests/rustdoc-gui/warning-block.goml +++ b/tests/rustdoc-gui/warning-block.goml @@ -4,7 +4,7 @@ show-text: true define-function: ( "check-warning", - (theme, color, border_color, background_color), + (theme, color, border_color), block { set-local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"} reload: @@ -27,19 +27,19 @@ define-function: ( call-function: ("check-warning", { "theme": "ayu", - "color": "rgb(197, 197, 197)", - "border_color": "rgb(255, 142, 0)", - "background_color": "rgba(0, 0, 0, 0)", + "color": "#c5c5c5", + "border_color": "#ff8e00", + "background_color": "transparent", }) call-function: ("check-warning", { "theme": "dark", - "color": "rgb(221, 221, 221)", - "border_color": "rgb(255, 142, 0)", - "background_color": "rgba(0, 0, 0, 0)", + "color": "#ddd", + "border_color": "#ff8e00", + "background_color": "transparent", }) call-function: ("check-warning", { "theme": "light", - "color": "rgb(0, 0, 0)", - "border_color": "rgb(255, 142, 0)", - "background_color": "rgba(0, 0, 0, 0)", + "color": "black", + "border_color": "#ff8e00", + "background_color": "transparent", }) From a448468e28fea642386a88622c4732fc46634a79 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Sat, 26 Aug 2023 11:25:04 +0200 Subject: [PATCH 5/5] Remove unneeded "background_color" parameter --- tests/rustdoc-gui/warning-block.goml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/tests/rustdoc-gui/warning-block.goml b/tests/rustdoc-gui/warning-block.goml index ce75fb58bc1e0..8832b65c4d8d6 100644 --- a/tests/rustdoc-gui/warning-block.goml +++ b/tests/rustdoc-gui/warning-block.goml @@ -14,13 +14,13 @@ define-function: ( "margin-bottom": "12px", "color": |color|, "border-left": "2px solid " + |border_color|, - "background-color": |background_color|, + "background-color": "transparent", }) assert-css: ("#doc-warning-2", { "margin-bottom": "0px", "color": |color|, "border-left": "2px solid " + |border_color|, - "background-color": |background_color|, + "background-color": "transparent", }) }, ) @@ -29,17 +29,14 @@ call-function: ("check-warning", { "theme": "ayu", "color": "#c5c5c5", "border_color": "#ff8e00", - "background_color": "transparent", }) call-function: ("check-warning", { "theme": "dark", "color": "#ddd", "border_color": "#ff8e00", - "background_color": "transparent", }) call-function: ("check-warning", { "theme": "light", "color": "black", "border_color": "#ff8e00", - "background_color": "transparent", })