From f6c6c6890226cefac5a0c42720a8ad7098e54ab9 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Sun, 17 Aug 2025 12:55:28 +0200 Subject: [PATCH] Bump Rust to 1.89 in CI (#6775) Co-authored-by: Drodt Co-authored-by: Daniel Drodt <132357467+Drodt@users.noreply.github.com> --- .github/workflows/ci.yml | 4 ++-- .github/workflows/release.yml | 2 +- crates/typst-layout/src/math/attach.rs | 8 +++++++- crates/typst-library/src/visualize/image/pdf.rs | 2 +- flake.lock | 6 +++--- flake.nix | 2 +- 6 files changed, 15 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7180dcad9..3c6bbaad6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,7 +40,7 @@ jobs: sudo dpkg --add-architecture i386 sudo apt update sudo apt install -y gcc-multilib libssl-dev:i386 pkg-config:i386 - - uses: dtolnay/rust-toolchain@1.88.0 + - uses: dtolnay/rust-toolchain@1.89.0 with: targets: ${{ matrix.bits == 32 && 'i686-unknown-linux-gnu' || '' }} - uses: Swatinem/rust-cache@v2 @@ -73,7 +73,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@1.88.0 + - uses: dtolnay/rust-toolchain@1.89.0 with: components: clippy, rustfmt - uses: Swatinem/rust-cache@v2 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 566fc5808..666d02868 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -44,7 +44,7 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@1.88.0 + - uses: dtolnay/rust-toolchain@1.89.0 with: target: ${{ matrix.target }} diff --git a/crates/typst-layout/src/math/attach.rs b/crates/typst-layout/src/math/attach.rs index dd3d16f9d..05b34fc56 100644 --- a/crates/typst-layout/src/math/attach.rs +++ b/crates/typst-layout/src/math/attach.rs @@ -1,3 +1,10 @@ +// Can be re-enabled once `Option::map_or_default` is stable in our MSRV. +#![allow(unstable_name_collisions)] + +// Is unused in compiler versions where `Option::map_or_default` is stable. +#[allow(unused_imports)] +use typst_utils::OptionExt; + use typst_library::diag::SourceResult; use typst_library::foundations::{Packed, StyleChain, SymbolElem}; use typst_library::layout::{Abs, Axis, Corner, Frame, Point, Rel, Size}; @@ -5,7 +12,6 @@ use typst_library::math::{ AttachElem, EquationElem, LimitsElem, PrimesElem, ScriptsElem, StretchElem, }; use typst_library::text::Font; -use typst_utils::OptionExt; use super::{ FrameFragment, Limits, MathContext, MathFragment, stretch_fragment, diff --git a/crates/typst-library/src/visualize/image/pdf.rs b/crates/typst-library/src/visualize/image/pdf.rs index 3ab0b8f7f..2dcc07865 100644 --- a/crates/typst-library/src/visualize/image/pdf.rs +++ b/crates/typst-library/src/visualize/image/pdf.rs @@ -70,7 +70,7 @@ impl PdfImage { } /// Returns the PDF page of the image. - pub fn page(&self) -> &Page { + pub fn page(&self) -> &Page<'_> { &self.document().pdf().pages()[self.0.page_index] } diff --git a/flake.lock b/flake.lock index df8b752ba..7ea2d3e2f 100644 --- a/flake.lock +++ b/flake.lock @@ -112,13 +112,13 @@ "rust-manifest": { "flake": false, "locked": { - "narHash": "sha256-YZfjbpqCYQFG1qLl2zMyFq2nFwmB2aFo5DSOCaBtGLY=", + "narHash": "sha256-nzhgCEnR/ggzYuS1CGIrvJyTElA5hPY12NGkSgIfl6A=", "type": "file", - "url": "https://static.rust-lang.org/dist/channel-rust-1.88.0.toml" + "url": "https://static.rust-lang.org/dist/channel-rust-1.89.0.toml" }, "original": { "type": "file", - "url": "https://static.rust-lang.org/dist/channel-rust-1.88.0.toml" + "url": "https://static.rust-lang.org/dist/channel-rust-1.89.0.toml" } }, "systems": { diff --git a/flake.nix b/flake.nix index 5afb5a846..3aba9fa2a 100644 --- a/flake.nix +++ b/flake.nix @@ -10,7 +10,7 @@ inputs.nixpkgs.follows = "nixpkgs"; }; rust-manifest = { - url = "https://static.rust-lang.org/dist/channel-rust-1.88.0.toml"; + url = "https://static.rust-lang.org/dist/channel-rust-1.89.0.toml"; flake = false; }; };