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

@ -887,7 +887,7 @@ impl DataBlock {
*cx,
range.end - range.start,
// SAFETY: This is safe because we have checked there is no overlapping view
(*raw)[range.clone()].as_mut_ptr() as _,
(&mut (*raw))[range.clone()].as_mut_ptr() as _,
Some(free_func),
raw as _,
)

View file

@ -111,7 +111,7 @@ impl<T> DomRefCell<T> {
///
/// Panics if the value is currently mutably borrowed.
#[track_caller]
pub(crate) fn borrow(&self) -> Ref<T> {
pub(crate) fn borrow(&self) -> Ref<'_, T> {
self.value.borrow()
}
@ -124,7 +124,7 @@ impl<T> DomRefCell<T> {
///
/// Panics if the value is currently borrowed.
#[track_caller]
pub(crate) fn borrow_mut(&self) -> RefMut<T> {
pub(crate) fn borrow_mut(&self) -> RefMut<'_, T> {
self.value.borrow_mut()
}
@ -138,7 +138,7 @@ impl<T> DomRefCell<T> {
/// # Panics
///
/// Panics if this is called off the script thread.
pub(crate) fn try_borrow(&self) -> Result<Ref<T>, BorrowError> {
pub(crate) fn try_borrow(&self) -> Result<Ref<'_, T>, BorrowError> {
assert_in_script();
self.value.try_borrow()
}
@ -153,7 +153,7 @@ impl<T> DomRefCell<T> {
/// # Panics
///
/// Panics if this is called off the script thread.
pub(crate) fn try_borrow_mut(&self) -> Result<RefMut<T>, BorrowMutError> {
pub(crate) fn try_borrow_mut(&self) -> Result<RefMut<'_, T>, BorrowMutError> {
assert_in_script();
self.value.try_borrow_mut()
}

View file

@ -114,8 +114,7 @@ impl TrustedPromise {
self.owner_thread,
live_references as *const _ as *const libc::c_void
);
// Borrow-check error requires the redundant `let promise = ...; promise` here.
let promise = match live_references
match live_references
.promise_table
.borrow_mut()
.entry(self.dom_object)
@ -133,8 +132,7 @@ impl TrustedPromise {
promise
},
Vacant(_) => unreachable!(),
};
promise
}
})
}

View file

@ -64,11 +64,11 @@ pub(crate) trait ToLayout<T> {
/// # Safety
///
/// The `self` parameter to this method must meet all the requirements of [`ptr::NonNull::as_ref`].
unsafe fn to_layout(&self) -> LayoutDom<T>;
unsafe fn to_layout(&self) -> LayoutDom<'_, T>;
}
impl<T: DomObject> ToLayout<T> for Dom<T> {
unsafe fn to_layout(&self) -> LayoutDom<T> {
unsafe fn to_layout(&self) -> LayoutDom<'_, T> {
assert_in_layout();
LayoutDom {
value: unsafe { self.as_ptr().as_ref().unwrap() },
@ -266,7 +266,7 @@ impl<T: DomObject> MutNullableDom<T> {
/// Retrieve a copy of the inner optional `Dom<T>` as `LayoutDom<T>`.
/// For use by layout, which can't use safe types like Temporary.
#[cfg_attr(crown, allow(crown::unrooted_must_root))]
pub(crate) unsafe fn get_inner_as_layout(&self) -> Option<LayoutDom<T>> {
pub(crate) unsafe fn get_inner_as_layout(&self) -> Option<LayoutDom<'_, T>> {
assert_in_layout();
unsafe { (*self.ptr.get()).as_ref().map(|js| js.to_layout()) }
}