Bump Rust to 1.83 (#5534)

This commit is contained in:
Laurenz 2024-12-05 16:57:01 +01:00 committed by GitHub
parent caa72f4ec2
commit 0228462ba1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
13 changed files with 19 additions and 17 deletions

View File

@ -30,7 +30,7 @@ jobs:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1.82.0 - uses: dtolnay/rust-toolchain@1.83.0
- uses: Swatinem/rust-cache@v2 - uses: Swatinem/rust-cache@v2
- run: cargo test --workspace --no-run - run: cargo test --workspace --no-run
- run: cargo test --workspace --no-fail-fast - run: cargo test --workspace --no-fail-fast
@ -59,7 +59,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1.82.0 - uses: dtolnay/rust-toolchain@1.83.0
with: with:
components: clippy, rustfmt components: clippy, rustfmt
- uses: Swatinem/rust-cache@v2 - uses: Swatinem/rust-cache@v2

View File

@ -44,7 +44,7 @@ jobs:
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1.82.0 - uses: dtolnay/rust-toolchain@1.83.0
with: with:
target: ${{ matrix.target }} target: ${{ matrix.target }}

View File

@ -45,7 +45,7 @@ impl<T> Repeatable<T> {
} }
} }
impl<'a> GridLayouter<'a> { impl GridLayouter<'_> {
/// Layouts the header's rows. /// Layouts the header's rows.
/// Skips regions as necessary. /// Skips regions as necessary.
pub fn layout_header( pub fn layout_header(

View File

@ -85,7 +85,7 @@ pub struct CellMeasurementData<'layouter> {
pub frames_in_previous_regions: usize, pub frames_in_previous_regions: usize,
} }
impl<'a> GridLayouter<'a> { impl GridLayouter<'_> {
/// Layout a rowspan over the already finished regions, plus the current /// Layout a rowspan over the already finished regions, plus the current
/// region's frame and resolved rows, if it wasn't finished yet (because /// region's frame and resolved rows, if it wasn't finished yet (because
/// we're being called from `finish_region`, but note that this function is /// we're being called from `finish_region`, but note that this function is

View File

@ -38,7 +38,7 @@ pub struct Line<'a> {
pub dash: Option<Dash>, pub dash: Option<Dash>,
} }
impl<'a> Line<'a> { impl Line<'_> {
/// Create an empty line. /// Create an empty line.
pub fn empty() -> Self { pub fn empty() -> Self {
Self { Self {
@ -685,7 +685,7 @@ impl<'a> Deref for Items<'a> {
} }
} }
impl<'a> DerefMut for Items<'a> { impl DerefMut for Items<'_> {
fn deref_mut(&mut self) -> &mut Self::Target { fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0 &mut self.0
} }

View File

@ -350,6 +350,7 @@ impl Route<'_> {
} }
#[comemo::track] #[comemo::track]
#[allow(clippy::needless_lifetimes)]
impl<'a> Route<'a> { impl<'a> Route<'a> {
/// Whether the given id is part of the route. /// Whether the given id is part of the route.
pub fn contains(&self, id: FileId) -> bool { pub fn contains(&self, id: FileId) -> bool {

View File

@ -203,6 +203,7 @@ impl<'a> Locator<'a> {
} }
#[comemo::track] #[comemo::track]
#[allow(clippy::needless_lifetimes)]
impl<'a> Locator<'a> { impl<'a> Locator<'a> {
/// Resolves the locator based on its local and the outer information. /// Resolves the locator based on its local and the outer information.
fn resolve(&self) -> Resolved { fn resolve(&self) -> Resolved {

View File

@ -93,7 +93,7 @@ struct State<'a> {
size: Size, size: Size,
} }
impl<'a> State<'a> { impl State<'_> {
fn new(size: Size, transform: sk::Transform, pixel_per_pt: f32) -> Self { fn new(size: Size, transform: sk::Transform, pixel_per_pt: f32) -> Self {
Self { Self {
size, size,

View File

@ -767,7 +767,7 @@ impl<'a> LinkedNode<'a> {
} }
/// Access to parents and siblings. /// Access to parents and siblings.
impl<'a> LinkedNode<'a> { impl LinkedNode<'_> {
/// Get this node's parent. /// Get this node's parent.
pub fn parent(&self) -> Option<&Self> { pub fn parent(&self) -> Option<&Self> {
self.parent.as_deref() self.parent.as_deref()
@ -825,7 +825,7 @@ pub enum Side {
} }
/// Access to leaves. /// Access to leaves.
impl<'a> LinkedNode<'a> { impl LinkedNode<'_> {
/// Get the rightmost non-trivia leaf before this node. /// Get the rightmost non-trivia leaf before this node.
pub fn prev_leaf(&self) -> Option<Self> { pub fn prev_leaf(&self) -> Option<Self> {
let mut node = self.clone(); let mut node = self.clone();

View File

@ -1911,7 +1911,7 @@ struct PartialState {
} }
/// The Memoization interface. /// The Memoization interface.
impl<'s> Parser<'s> { impl Parser<'_> {
/// Store the already parsed nodes and the parser state into the memo map by /// Store the already parsed nodes and the parser state into the memo map by
/// extending the arena and storing the extended range and a checkpoint. /// extending the arena and storing the extended range and a checkpoint.
fn memoize_parsed_nodes(&mut self, key: MemoKey, prev_len: usize) { fn memoize_parsed_nodes(&mut self, key: MemoKey, prev_len: usize) {
@ -1967,7 +1967,7 @@ impl<'s> Parser<'s> {
/// Functions for eating expected or unexpected tokens and generating errors if /// Functions for eating expected or unexpected tokens and generating errors if
/// we don't get what we expect. /// we don't get what we expect.
impl<'s> Parser<'s> { impl Parser<'_> {
/// Consume the given `kind` or produce an error. /// Consume the given `kind` or produce an error.
fn expect(&mut self, kind: SyntaxKind) -> bool { fn expect(&mut self, kind: SyntaxKind) -> bool {
let at = self.at(kind); let at = self.at(kind);

View File

@ -13,7 +13,7 @@ struct CliResolver<'a> {
base: &'a str, base: &'a str,
} }
impl<'a> Resolver for CliResolver<'a> { impl Resolver for CliResolver<'_> {
fn commits(&self, from: &str, to: &str) -> Vec<typst_docs::Commit> { fn commits(&self, from: &str, to: &str) -> Vec<typst_docs::Commit> {
if self.verbose { if self.verbose {
eprintln!("commits({from}, {to})"); eprintln!("commits({from}, {to})");

6
flake.lock generated
View File

@ -112,13 +112,13 @@
"rust-manifest": { "rust-manifest": {
"flake": false, "flake": false,
"locked": { "locked": {
"narHash": "sha256-7BORPQOFj1mTsyFBkfImqoE4gwyZfPLYXFFPXPVbo4A=", "narHash": "sha256-Yqu2/i9170R7pQhvOCR1f5SyFr7PcFbO6xcMr9KWruQ=",
"type": "file", "type": "file",
"url": "https://static.rust-lang.org/dist/channel-rust-1.82.0.toml" "url": "https://static.rust-lang.org/dist/channel-rust-1.83.0.toml"
}, },
"original": { "original": {
"type": "file", "type": "file",
"url": "https://static.rust-lang.org/dist/channel-rust-1.82.0.toml" "url": "https://static.rust-lang.org/dist/channel-rust-1.83.0.toml"
} }
}, },
"systems": { "systems": {

View File

@ -10,7 +10,7 @@
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
rust-manifest = { rust-manifest = {
url = "https://static.rust-lang.org/dist/channel-rust-1.82.0.toml"; url = "https://static.rust-lang.org/dist/channel-rust-1.83.0.toml";
flake = false; flake = false;
}; };
}; };