aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout_2020
diff options
context:
space:
mode:
authorNico Burns <nico@nicoburns.com>2025-01-01 22:38:28 +1300
committerGitHub <noreply@github.com>2025-01-01 09:38:28 +0000
commitdeb819f23368ed43b9312a439e48f9d5f961930c (patch)
tree5645f16c1b3915204b009b6c44aa8e11ab62014c /components/layout_2020
parentd581acab3bd244e233105edde972a0605224358a (diff)
downloadservo-deb819f23368ed43b9312a439e48f9d5f961930c.tar.gz
servo-deb819f23368ed43b9312a439e48f9d5f961930c.zip
Upgrade rustc to 1.83 (#34793)
* Upgrade rustc to 1.83 Signed-off-by: Nico Burns <nico@nicoburns.com> * Fix crown (change copied from linked clippy function) Signed-off-by: Nico Burns <nico@nicoburns.com> * Fix named lifetime lint Signed-off-by: Nico Burns <nico@nicoburns.com> * Bump shell.nix Signed-off-by: Nico Burns <nico@nicoburns.com> * Fix non-local impl warnings Signed-off-by: Nico Burns <nico@nicoburns.com> * Format with 1.83 formatting changes Signed-off-by: Nico Burns <nico@nicoburns.com> * Fix manual non-local impl Signed-off-by: Nico Burns <nico@nicoburns.com> * More fixes for crown Signed-off-by: Nico Burns <nico@nicoburns.com> * Fix tidy Signed-off-by: Nico Burns <nico@nicoburns.com> * Fix needless_return lints Signed-off-by: Nico Burns <nico@nicoburns.com> * Fix doc comment lint Signed-off-by: Nico Burns <nico@nicoburns.com> * Fix missing wait lint Signed-off-by: Nico Burns <nico@nicoburns.com> * Allow needless_lifetimes lint Signed-off-by: Nico Burns <nico@nicoburns.com> * more doc comments Signed-off-by: Nico Burns <nico@nicoburns.com> * More needless_returns Signed-off-by: Nico Burns <nico@nicoburns.com> * is_empty lint Signed-off-by: Nico Burns <nico@nicoburns.com> * Fix needless_lifetime lints Signed-off-by: Nico Burns <nico@nicoburns.com> * fix div_ceil lint Signed-off-by: Nico Burns <nico@nicoburns.com> * Allow non-minimal bool Signed-off-by: Nico Burns <nico@nicoburns.com> * Non-local impl in constellation Signed-off-by: Nico Burns <nico@nicoburns.com> * Missing wait in constellation Signed-off-by: Nico Burns <nico@nicoburns.com> * fmt Signed-off-by: Nico Burns <nico@nicoburns.com> * remove useless lints table Signed-off-by: Nico Burns <nico@nicoburns.com> * Fixup comments Signed-off-by: Nico Burns <nico@nicoburns.com> * Allow non-local definition in sandboxing code to simplify feature flagging Signed-off-by: Nico Burns <nico@nicoburns.com> * Remove wait calls and allow zombie_processes lint Signed-off-by: Nico Burns <nico@nicoburns.com> --------- Signed-off-by: Nico Burns <nico@nicoburns.com>
Diffstat (limited to 'components/layout_2020')
-rw-r--r--components/layout_2020/flow/mod.rs2
-rw-r--r--components/layout_2020/lib.rs1
-rw-r--r--components/layout_2020/table/layout.rs2
-rw-r--r--components/layout_2020/taffy/layout.rs16
4 files changed, 15 insertions, 6 deletions
diff --git a/components/layout_2020/flow/mod.rs b/components/layout_2020/flow/mod.rs
index 185143f425c..c9a1cfe55f1 100644
--- a/components/layout_2020/flow/mod.rs
+++ b/components/layout_2020/flow/mod.rs
@@ -1859,7 +1859,7 @@ impl<'container> PlacementState<'container> {
fn new(
collapsible_with_parent_start_margin: CollapsibleWithParentStartMargin,
containing_block: &'container ContainingBlock<'container>,
- ) -> PlacementState {
+ ) -> PlacementState<'container> {
let is_inline_block_context =
containing_block.style.get_box().clone_display() == Display::InlineBlock;
PlacementState {
diff --git a/components/layout_2020/lib.rs b/components/layout_2020/lib.rs
index 1a84b6c94b4..bf38def9e28 100644
--- a/components/layout_2020/lib.rs
+++ b/components/layout_2020/lib.rs
@@ -3,6 +3,7 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
#![deny(unsafe_code)]
+#![allow(clippy::needless_lifetimes)]
mod cell;
pub mod context;
diff --git a/components/layout_2020/table/layout.rs b/components/layout_2020/table/layout.rs
index 6c977795fe2..aed912cc412 100644
--- a/components/layout_2020/table/layout.rs
+++ b/components/layout_2020/table/layout.rs
@@ -218,7 +218,7 @@ impl Zero for CellOrTrackMeasure {
}
impl<'a> TableLayout<'a> {
- fn new(table: &'a Table) -> TableLayout {
+ fn new(table: &'a Table) -> TableLayout<'a> {
Self {
table,
pbm: PaddingBorderMargin::zero(),
diff --git a/components/layout_2020/taffy/layout.rs b/components/layout_2020/taffy/layout.rs
index 3cdf162899e..8dd5421a3c7 100644
--- a/components/layout_2020/taffy/layout.rs
+++ b/components/layout_2020/taffy/layout.rs
@@ -75,7 +75,10 @@ impl Iterator for ChildIter {
}
impl taffy::TraversePartialTree for TaffyContainerContext<'_> {
- type ChildIter<'a> = ChildIter where Self: 'a;
+ type ChildIter<'a>
+ = ChildIter
+ where
+ Self: 'a;
fn child_ids(&self, _node_id: taffy::NodeId) -> Self::ChildIter<'_> {
ChildIter(0..self.source_child_nodes.len())
@@ -91,7 +94,10 @@ impl taffy::TraversePartialTree for TaffyContainerContext<'_> {
}
impl taffy::LayoutPartialTree for TaffyContainerContext<'_> {
- type CoreContainerStyle<'a> = TaffyStyloStyle<&'a ComputedValues> where Self: 'a;
+ type CoreContainerStyle<'a>
+ = TaffyStyloStyle<&'a ComputedValues>
+ where
+ Self: 'a;
fn get_core_container_style(&self, _node_id: taffy::NodeId) -> Self::CoreContainerStyle<'_> {
TaffyStyloStyle(self.style)
@@ -283,11 +289,13 @@ impl taffy::LayoutPartialTree for TaffyContainerContext<'_> {
}
impl taffy::LayoutGridContainer for TaffyContainerContext<'_> {
- type GridContainerStyle<'a> = TaffyStyloStyle<&'a ComputedValues>
+ type GridContainerStyle<'a>
+ = TaffyStyloStyle<&'a ComputedValues>
where
Self: 'a;
- type GridItemStyle<'a> = TaffyStyloStyle<AtomicRef<'a, ComputedValues>>
+ type GridItemStyle<'a>
+ = TaffyStyloStyle<AtomicRef<'a, ComputedValues>>
where
Self: 'a;