From 056e89ca70ac5f5e26faf793a90ae8ea3f719f04 Mon Sep 17 00:00:00 2001 From: Kenichi Kamiya Date: Thu, 13 Nov 2025 02:35:24 +0900 Subject: [PATCH] rslint: fix build --- .../rslint/fix-rustc-1.89-compatibility.patch | 22 +++++++++++++++++++ pkgs/by-name/rs/rslint/package.nix | 5 +++++ 2 files changed, 27 insertions(+) create mode 100644 pkgs/by-name/rs/rslint/fix-rustc-1.89-compatibility.patch diff --git a/pkgs/by-name/rs/rslint/fix-rustc-1.89-compatibility.patch b/pkgs/by-name/rs/rslint/fix-rustc-1.89-compatibility.patch new file mode 100644 index 000000000000..16efa461809d --- /dev/null +++ b/pkgs/by-name/rs/rslint/fix-rustc-1.89-compatibility.patch @@ -0,0 +1,22 @@ +From 1ceaa3a78d591599a5fe30f702bdb3dae1004f70 Mon Sep 17 00:00:00 2001 +From: Daeho Ro <40587651+daeho-ro@users.noreply.github.com> +Date: Sun, 14 Sep 2025 15:47:53 +0900 +Subject: [PATCH] fix: rust 1.89 compatibility + +--- + crates/rslint_rowan/src/arc.rs | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/crates/rslint_rowan/src/arc.rs b/crates/rslint_rowan/src/arc.rs +index 0977f4422e85384872183d999603be4d563a4a55..9d2e00c5844412bf0d097f5b219f877e67cab7e0 100644 +--- a/crates/rslint_rowan/src/arc.rs ++++ b/crates/rslint_rowan/src/arc.rs +@@ -575,7 +575,7 @@ impl Arc> { + // we'll just leak the uninitialized memory. + ptr::write(&mut ((*ptr).count), atomic::AtomicUsize::new(1)); + ptr::write(&mut ((*ptr).data.header), header); +- if let Some(current) = (*ptr).data.slice.get_mut(0) { ++ if let Some(current) = (&mut (*ptr).data.slice).get_mut(0) { + let mut current: *mut T = current; + for _ in 0..num_items { + ptr::write( diff --git a/pkgs/by-name/rs/rslint/package.nix b/pkgs/by-name/rs/rslint/package.nix index 166b46993283..bb0d7306b430 100644 --- a/pkgs/by-name/rs/rslint/package.nix +++ b/pkgs/by-name/rs/rslint/package.nix @@ -24,6 +24,11 @@ rustPlatform.buildRustPackage rec { "rslint_lsp" ]; + patches = [ + # This patch comes from https://github.com/rslint/rslint/pull/165, which was unmerged. + ./fix-rustc-1.89-compatibility.patch + ]; + meta = with lib; { description = "Fast, customizable, and easy to use JavaScript and TypeScript linter"; homepage = "https://rslint.org";