mirror of
https://github.com/servo/servo.git
synced 2025-09-30 08:39:16 +01:00
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:
parent
8587536755
commit
3225d19907
126 changed files with 408 additions and 610 deletions
|
@ -8322,8 +8322,6 @@ class CallbackMember(CGNativeMember):
|
|||
jsvalIndex = f"{i} + idx"
|
||||
else:
|
||||
jsvalIndex = f"{i}"
|
||||
if arg.optional and not arg.defaultValue:
|
||||
argval += ".unwrap()"
|
||||
|
||||
conversion = wrapForType(
|
||||
"argv_root.handle_mut()", result=argval,
|
||||
|
@ -8340,7 +8338,7 @@ class CallbackMember(CGNativeMember):
|
|||
)
|
||||
elif arg.optional and not arg.defaultValue:
|
||||
conversion = (
|
||||
f"{CGIfWrapper(f'{arg.identifier.name}.is_some()', CGGeneric(conversion)).define()}"
|
||||
f"{CGIfWrapper(f'let Some({arg.identifier.name}) = {arg.identifier.name}', CGGeneric(conversion)).define()}"
|
||||
f" else if argc == {i + 1} {{\n"
|
||||
" // This is our current trailing argument; reduce argc\n"
|
||||
" argc -= 1;\n"
|
||||
|
|
|
@ -47,11 +47,11 @@ impl<'a> From<&'a JSAutoRealm> for InRealm<'a> {
|
|||
}
|
||||
|
||||
impl InRealm<'_> {
|
||||
pub fn already(token: &AlreadyInRealm) -> InRealm {
|
||||
pub fn already(token: &AlreadyInRealm) -> InRealm<'_> {
|
||||
InRealm::Already(token)
|
||||
}
|
||||
|
||||
pub fn entered(token: &JSAutoRealm) -> InRealm {
|
||||
pub fn entered(token: &JSAutoRealm) -> InRealm<'_> {
|
||||
InRealm::Entered(token)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ impl PartialEq for Reflector {
|
|||
impl Reflector {
|
||||
/// Get the reflector.
|
||||
#[inline]
|
||||
pub fn get_jsobject(&self) -> HandleObject {
|
||||
pub fn get_jsobject(&self) -> HandleObject<'_> {
|
||||
// We're rooted, so it's safe to hand out a handle to object in Heap
|
||||
unsafe { HandleObject::from_raw(self.object.handle()) }
|
||||
}
|
||||
|
|
|
@ -354,7 +354,7 @@ where
|
|||
Heap<T>: JSTraceable + 'static,
|
||||
T: GCMethods + Copy,
|
||||
{
|
||||
pub fn handle(&self) -> Handle<T> {
|
||||
pub fn handle(&self) -> Handle<'_, T> {
|
||||
self.0.handle()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue