cargo: Bump rustc to 1.89 (#36818)

Update Rustc to 1.89.

Reviewable by commit.

Leftover work:
- #37330 
- #38777

---------

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Co-authored-by: sagudev <16504129+sagudev@users.noreply.github.com>
This commit is contained in:
webbeef 2025-08-19 04:07:53 -07:00 committed by GitHub
parent 8587536755
commit 3225d19907
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
126 changed files with 408 additions and 610 deletions

View file

@ -1001,7 +1001,7 @@ impl FlexContainer {
}
#[inline]
pub(crate) fn layout_style(&self) -> LayoutStyle {
pub(crate) fn layout_style(&self) -> LayoutStyle<'_> {
LayoutStyle::Default(&self.style)
}
}
@ -2046,7 +2046,7 @@ impl FlexItemBox {
content_box_sizes_and_pbm: &ContentBoxSizesAndPBM,
config: &FlexContainerConfig,
flex_context_getter: &impl Fn() -> &'a FlexContext<'a>,
) -> FlexItem {
) -> FlexItem<'_> {
let flex_axis = config.flex_axis;
let style = self.style();
let cross_axis_is_item_block_axis = cross_axis_is_item_block_axis(

View file

@ -151,6 +151,7 @@ impl FlexContainer {
}
}
#[allow(clippy::large_enum_variant)]
#[derive(Debug, MallocSizeOf)]
pub(crate) enum FlexLevelBox {
FlexItem(FlexItemBox),

View file

@ -66,7 +66,7 @@ impl InlineBox {
}
#[inline]
pub(crate) fn layout_style(&self) -> LayoutStyle {
pub(crate) fn layout_style(&self) -> LayoutStyle<'_> {
LayoutStyle::Default(&self.base.style)
}

View file

@ -355,7 +355,7 @@ impl IndependentFormattingContext {
}
#[inline]
pub(crate) fn layout_style(&self) -> LayoutStyle {
pub(crate) fn layout_style(&self) -> LayoutStyle<'_> {
match &self.contents {
IndependentFormattingContextContents::Replaced(fc) => fc.layout_style(&self.base),
IndependentFormattingContextContents::Flow(fc) => fc.layout_style(&self.base),

View file

@ -997,9 +997,11 @@ impl LayoutThread {
}
let root_node = root_element.as_node();
let damage_from_environment = viewport_changed
.then_some(RestyleDamage::RELAYOUT)
.unwrap_or_default();
let damage_from_environment = if viewport_changed {
RestyleDamage::RELAYOUT
} else {
Default::default()
};
let damage = compute_damage_and_repair_style(
&layout_context.style_context,
root_node.to_threadsafe(),

View file

@ -3,7 +3,7 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
use std::borrow::Cow;
use std::iter::repeat;
use std::iter::repeat_n;
use atomic_refcell::AtomicRef;
use layout_api::wrapper_traits::ThreadSafeLayoutNode;
@ -1165,6 +1165,6 @@ fn add_column(
shared_background_style: SharedStyle::new(column_info.style.clone()),
})
});
collection.extend(repeat(column.clone()).take(span as usize));
collection.extend(repeat_n(column.clone(), span as usize));
column
}

View file

@ -2754,21 +2754,21 @@ impl Table {
}
#[inline]
pub(crate) fn layout_style_for_grid(&self) -> LayoutStyle {
pub(crate) fn layout_style_for_grid(&self) -> LayoutStyle<'_> {
LayoutStyle::Default(&self.grid_style)
}
}
impl TableTrack {
#[inline]
pub(crate) fn layout_style(&self) -> LayoutStyle {
pub(crate) fn layout_style(&self) -> LayoutStyle<'_> {
LayoutStyle::Default(&self.base.style)
}
}
impl TableTrackGroup {
#[inline]
pub(crate) fn layout_style(&self) -> LayoutStyle {
pub(crate) fn layout_style(&self) -> LayoutStyle<'_> {
LayoutStyle::Default(&self.base.style)
}
}
@ -2806,7 +2806,7 @@ impl TableLayoutStyle<'_> {
impl TableSlotCell {
#[inline]
fn layout_style(&self) -> LayoutStyle {
fn layout_style(&self) -> LayoutStyle<'_> {
self.contents.layout_style(&self.base)
}

View file

@ -576,7 +576,7 @@ impl TaffyContainer {
}
#[inline]
pub(crate) fn layout_style(&self) -> LayoutStyle {
pub(crate) fn layout_style(&self) -> LayoutStyle<'_> {
LayoutStyle::Default(&self.style)
}
}

View file

@ -91,6 +91,7 @@ pub(crate) struct TaffyItemBox {
pub(crate) taffy_level_box: TaffyItemBoxInner,
}
#[allow(clippy::large_enum_variant)]
#[derive(Debug, MallocSizeOf)]
pub(crate) enum TaffyItemBoxInner {
InFlowBox(IndependentFormattingContext),

View file

@ -88,7 +88,7 @@ where
node.layout_data().is_none() || !parent_data.damage.is_empty()
}
fn shared_context(&self) -> &SharedStyleContext {
fn shared_context(&self) -> &SharedStyleContext<'_> {
&self.context.style_context
}
}