CI: fix the doc, 1.70.0 and Windows test failures on craft/0.30.13

With the lockfile step fixed, CI reaches steps that were never green on
this branch:

- rustdoc -D warnings: escape `*` inside <kbd> (invalid_html_tags) and
  wrap a bare URL in dark_mode.rs (nightly's bare_urls).
- docs.rs check (nightly, every platform): platform::wayland is built
  under docsrs on all platforms, but its clipboard API names
  platform_impl::wayland, which only exists with wayland_platform. The
  clipboard items are now gated on wayland_platform.
- Rust 1.70.0 on Windows: update_system_caret is pub but takes the
  pub(crate) CaretChange (E0446); it is pub(crate) now.
- ime_patches/pointer_patches read sources with CRLF on a Windows
  checkout (* text=auto) and missed patterns that span lines; source()
  normalizes to LF.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
David MannandClaude Opus 5.5 committed 2026-11-27 14:27:56 +01:00
1 parent 8de1bfe581
commit 3698a67bb7
6 files changed
+22 -7

No files matched your search

+3 -3
View File
@@ -548,10 +548,10 @@ pub enum KeyCode {
NumpadMemoryStore,
/// <kbd>M</kbd> Subtract current entry from the value stored in memory.
NumpadMemorySubtract,
/// <kbd>*</kbd> on a keyboard. For use with numpads that provide mathematical
/// operations (<kbd>+</kbd>, <kbd>-</kbd> <kbd>*</kbd> and <kbd>/</kbd>).
/// <kbd>\*</kbd> on a keyboard. For use with numpads that provide mathematical
/// operations (<kbd>+</kbd>, <kbd>-</kbd> <kbd>\*</kbd> and <kbd>/</kbd>).
///
/// Use `NumpadStar` for the <kbd>*</kbd> key on phones and remote controls.
/// Use `NumpadStar` for the <kbd>\*</kbd> key on phones and remote controls.
NumpadMultiply,
/// <kbd>(</kbd> Found on the Microsoft Natural Keyboard.
NumpadParenLeft,
+7
View File
@@ -25,6 +25,8 @@ use crate::window::{Window, WindowAttributes, WindowId};
pub use crate::window::Theme;
// The clipboard needs the Wayland backend, which docs built for other platforms (`docsrs`) lack.
#[cfg(wayland_platform)]
pub use crate::platform_impl::wayland::clipboard::{
ClipboardContent, ClipboardError, ImageClaimReservation, InputOriginToken, PngBytes,
PngBytesWriter, RegularTransferHandle, SelectionClaim, TransferHandle, TransferOptions,
@@ -37,6 +39,7 @@ pub trait ActiveEventLoopExtWayland {
fn is_wayland(&self) -> bool;
/// The clipboard of this event loop, or [`None`] if it doesn't use Wayland.
#[cfg(wayland_platform)]
fn clipboard(&self) -> Option<Clipboard>;
}
@@ -46,6 +49,7 @@ impl ActiveEventLoopExtWayland for ActiveEventLoop {
self.p.is_wayland()
}
#[cfg(wayland_platform)]
fn clipboard(&self) -> Option<Clipboard> {
#[allow(clippy::single_match)]
match &self.p {
@@ -81,11 +85,13 @@ impl ActiveEventLoopExtWayland for ActiveEventLoop {
/// `input_origin` and `reserve_image_claim` are synchronous state transitions used at that same
/// input/output boundary. This is a caller contract; the type does not inspect which thread is
/// currently calling it.
#[cfg(wayland_platform)]
#[derive(Clone)]
pub struct Clipboard {
state: Weak<crate::platform_impl::wayland::ClipboardState>,
}
#[cfg(wayland_platform)]
impl Clipboard {
/// The clipboard of the winit event loop connected through `display`, a `wl_display`
/// pointer such as the one in its `WaylandDisplayHandle`, if that event loop still exists.
@@ -281,6 +287,7 @@ impl Clipboard {
}
}
#[cfg(wayland_platform)]
impl fmt::Debug for Clipboard {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("Clipboard").finish_non_exhaustive()
+1 -1
View File
@@ -1,5 +1,5 @@
/// This is a simple implementation of support for Windows Dark Mode,
/// which is inspired by the solution in https://github.com/ysc3839/win32-darkmode
/// which is inspired by the solution in <https://github.com/ysc3839/win32-darkmode>
use std::{ffi::c_void, ptr};
use crate::utils::Lazy;
+1 -1
View File
@@ -182,7 +182,7 @@ impl ImeContext {
/// Applies a change to the hidden system caret that follows the IME cursor area
/// (`ime_caret.rs`). Runs on the window's thread, which owns the caret.
pub unsafe fn update_system_caret(hwnd: HWND, change: Option<CaretChange>) {
pub(crate) unsafe fn update_system_caret(hwnd: HWND, change: Option<CaretChange>) {
match change {
None => {},
// A new caret is hidden, and this one is never shown.
+5 -1
View File
@@ -6,9 +6,13 @@
use std::path::Path;
/// The source with `\n` line endings: a Windows checkout has `\r\n` (`* text=auto`), and some
/// tests match code that spans lines.
fn source(path: &str) -> String {
let path = Path::new(env!("CARGO_MANIFEST_DIR")).join("src/platform_impl").join(path);
std::fs::read_to_string(&path).unwrap_or_else(|err| panic!("{}: {err}", path.display()))
std::fs::read_to_string(&path)
.unwrap_or_else(|err| panic!("{}: {err}", path.display()))
.replace("\r\n", "\n")
}
/// The text after `start`, up to the first `end`.
+5 -1
View File
@@ -6,9 +6,13 @@
use std::path::Path;
/// The source with `\n` line endings: a Windows checkout has `\r\n` (`* text=auto`), and some
/// tests match code that spans lines.
fn source(path: &str) -> String {
let path = Path::new(env!("CARGO_MANIFEST_DIR")).join("src/platform_impl").join(path);
std::fs::read_to_string(&path).unwrap_or_else(|err| panic!("{}: {err}", path.display()))
std::fs::read_to_string(&path)
.unwrap_or_else(|err| panic!("{}: {err}", path.display()))
.replace("\r\n", "\n")
}
/// The text after `start`, up to the first `end`.