diff options
| author | Laurenz <laurmaedje@gmail.com> | 2024-12-05 16:57:01 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-05 15:57:01 +0000 |
| commit | 0228462ba10397468b3c0937e2e9cd1d3118e0fc (patch) | |
| tree | 94a09e12b7febce17a78f751d1a5e4f104234307 /crates | |
| parent | caa72f4ec2401c275ddd3d8794dcf0bfdf9697a8 (diff) | |
Bump Rust to 1.83 (#5534)
Diffstat (limited to 'crates')
| -rw-r--r-- | crates/typst-layout/src/grid/repeated.rs | 2 | ||||
| -rw-r--r-- | crates/typst-layout/src/grid/rowspans.rs | 2 | ||||
| -rw-r--r-- | crates/typst-layout/src/inline/line.rs | 4 | ||||
| -rw-r--r-- | crates/typst-library/src/engine.rs | 1 | ||||
| -rw-r--r-- | crates/typst-library/src/introspection/locator.rs | 1 | ||||
| -rw-r--r-- | crates/typst-render/src/lib.rs | 2 | ||||
| -rw-r--r-- | crates/typst-syntax/src/node.rs | 4 | ||||
| -rw-r--r-- | crates/typst-syntax/src/parser.rs | 4 |
8 files changed, 11 insertions, 9 deletions
diff --git a/crates/typst-layout/src/grid/repeated.rs b/crates/typst-layout/src/grid/repeated.rs index 972179da..8d08d56d 100644 --- a/crates/typst-layout/src/grid/repeated.rs +++ b/crates/typst-layout/src/grid/repeated.rs @@ -45,7 +45,7 @@ impl<T> Repeatable<T> { } } -impl<'a> GridLayouter<'a> { +impl GridLayouter<'_> { /// Layouts the header's rows. /// Skips regions as necessary. pub fn layout_header( diff --git a/crates/typst-layout/src/grid/rowspans.rs b/crates/typst-layout/src/grid/rowspans.rs index 03b4103f..93d4c960 100644 --- a/crates/typst-layout/src/grid/rowspans.rs +++ b/crates/typst-layout/src/grid/rowspans.rs @@ -85,7 +85,7 @@ pub struct CellMeasurementData<'layouter> { pub frames_in_previous_regions: usize, } -impl<'a> GridLayouter<'a> { +impl GridLayouter<'_> { /// Layout a rowspan over the already finished regions, plus the current /// 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 diff --git a/crates/typst-layout/src/inline/line.rs b/crates/typst-layout/src/inline/line.rs index 6dca95a9..ef7e26c3 100644 --- a/crates/typst-layout/src/inline/line.rs +++ b/crates/typst-layout/src/inline/line.rs @@ -38,7 +38,7 @@ pub struct Line<'a> { pub dash: Option<Dash>, } -impl<'a> Line<'a> { +impl Line<'_> { /// Create an empty line. pub fn empty() -> 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 { &mut self.0 } diff --git a/crates/typst-library/src/engine.rs b/crates/typst-library/src/engine.rs index cd25ec48..80aaef22 100644 --- a/crates/typst-library/src/engine.rs +++ b/crates/typst-library/src/engine.rs @@ -350,6 +350,7 @@ impl Route<'_> { } #[comemo::track] +#[allow(clippy::needless_lifetimes)] impl<'a> Route<'a> { /// Whether the given id is part of the route. pub fn contains(&self, id: FileId) -> bool { diff --git a/crates/typst-library/src/introspection/locator.rs b/crates/typst-library/src/introspection/locator.rs index 4045aa9c..a84cf163 100644 --- a/crates/typst-library/src/introspection/locator.rs +++ b/crates/typst-library/src/introspection/locator.rs @@ -203,6 +203,7 @@ impl<'a> Locator<'a> { } #[comemo::track] +#[allow(clippy::needless_lifetimes)] impl<'a> Locator<'a> { /// Resolves the locator based on its local and the outer information. fn resolve(&self) -> Resolved { diff --git a/crates/typst-render/src/lib.rs b/crates/typst-render/src/lib.rs index 8595e790..4cd32d39 100644 --- a/crates/typst-render/src/lib.rs +++ b/crates/typst-render/src/lib.rs @@ -93,7 +93,7 @@ struct State<'a> { size: Size, } -impl<'a> State<'a> { +impl State<'_> { fn new(size: Size, transform: sk::Transform, pixel_per_pt: f32) -> Self { Self { size, diff --git a/crates/typst-syntax/src/node.rs b/crates/typst-syntax/src/node.rs index 14ad018f..b7e1809d 100644 --- a/crates/typst-syntax/src/node.rs +++ b/crates/typst-syntax/src/node.rs @@ -767,7 +767,7 @@ impl<'a> LinkedNode<'a> { } /// Access to parents and siblings. -impl<'a> LinkedNode<'a> { +impl LinkedNode<'_> { /// Get this node's parent. pub fn parent(&self) -> Option<&Self> { self.parent.as_deref() @@ -825,7 +825,7 @@ pub enum Side { } /// Access to leaves. -impl<'a> LinkedNode<'a> { +impl LinkedNode<'_> { /// Get the rightmost non-trivia leaf before this node. pub fn prev_leaf(&self) -> Option<Self> { let mut node = self.clone(); diff --git a/crates/typst-syntax/src/parser.rs b/crates/typst-syntax/src/parser.rs index ea5b9155..e087f9dd 100644 --- a/crates/typst-syntax/src/parser.rs +++ b/crates/typst-syntax/src/parser.rs @@ -1911,7 +1911,7 @@ struct PartialState { } /// The Memoization interface. -impl<'s> Parser<'s> { +impl Parser<'_> { /// 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. 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 /// we don't get what we expect. -impl<'s> Parser<'s> { +impl Parser<'_> { /// Consume the given `kind` or produce an error. fn expect(&mut self, kind: SyntaxKind) -> bool { let at = self.at(kind); |
