mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
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>
This commit is contained in:
parent
d581acab3b
commit
deb819f233
35 changed files with 155 additions and 139 deletions
|
@ -35,7 +35,7 @@ fn expand_dom_object(input: syn::DeriveInput) -> proc_macro2::TokenStream {
|
|||
|
||||
let name = &input.ident;
|
||||
let (impl_generics, ty_generics, where_clause) = input.generics.split_for_impl();
|
||||
let mut items = quote! {
|
||||
let items = quote! {
|
||||
impl #impl_generics ::js::conversions::ToJSValConvertible for #name #ty_generics #where_clause {
|
||||
#[allow(unsafe_code)]
|
||||
unsafe fn to_jsval(&self,
|
||||
|
@ -66,7 +66,15 @@ fn expand_dom_object(input: syn::DeriveInput) -> proc_macro2::TokenStream {
|
|||
crate::DomObject::reflector(self) == crate::DomObject::reflector(other)
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
let mut params = proc_macro2::TokenStream::new();
|
||||
params.append_separated(
|
||||
input.generics.type_params().map(|param| ¶m.ident),
|
||||
quote! {,},
|
||||
);
|
||||
|
||||
let mut dummy_items = quote! {
|
||||
// Generic trait with a blanket impl over `()` for all types.
|
||||
// becomes ambiguous if impl
|
||||
trait NoDomObjectInDomObject<A> {
|
||||
|
@ -83,13 +91,7 @@ fn expand_dom_object(input: syn::DeriveInput) -> proc_macro2::TokenStream {
|
|||
impl<T> NoDomObjectInDomObject<Invalid> for T where T: ?Sized + crate::DomObject {}
|
||||
};
|
||||
|
||||
let mut params = proc_macro2::TokenStream::new();
|
||||
params.append_separated(
|
||||
input.generics.type_params().map(|param| ¶m.ident),
|
||||
quote! {,},
|
||||
);
|
||||
|
||||
items.append_all(field_types.iter().enumerate().map(|(i, ty)| {
|
||||
dummy_items.append_all(field_types.iter().enumerate().map(|(i, ty)| {
|
||||
let s = syn::Ident::new(&format!("S{i}"), proc_macro2::Span::call_site());
|
||||
quote! {
|
||||
struct #s<#params>(#params);
|
||||
|
@ -111,7 +113,8 @@ fn expand_dom_object(input: syn::DeriveInput) -> proc_macro2::TokenStream {
|
|||
);
|
||||
let tokens = quote! {
|
||||
#[allow(non_upper_case_globals)]
|
||||
const #dummy_const: () = { #items };
|
||||
const #dummy_const: () = { #dummy_items };
|
||||
#items
|
||||
};
|
||||
|
||||
tokens
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue