mirror of
https://github.com/servo/servo.git
synced 2025-07-23 15:23:42 +01:00
style: Reduce diff with upstream derive_common and malloc_size_of (#31363)
This commit is contained in:
parent
1e503c3bc1
commit
aeb2503fdb
5 changed files with 47 additions and 6 deletions
|
@ -3,7 +3,6 @@ name = "derive_common"
|
|||
version = "0.0.1"
|
||||
authors = ["The Servo Project Developers"]
|
||||
license = "MPL-2.0"
|
||||
edition = "2018"
|
||||
publish = false
|
||||
|
||||
[lib]
|
||||
|
|
|
@ -4,11 +4,11 @@
|
|||
|
||||
use darling::{FromDeriveInput, FromField, FromVariant};
|
||||
use proc_macro2::{Span, TokenStream};
|
||||
use quote::{quote, TokenStreamExt};
|
||||
use quote::TokenStreamExt;
|
||||
use syn::{
|
||||
self, parse_quote, AngleBracketedGenericArguments, AssocType, DeriveInput, Field,
|
||||
GenericArgument, GenericParam, Ident, Path, PathArguments, PathSegment, QSelf, Type, TypeArray,
|
||||
TypeGroup, TypeParam, TypeParen, TypePath, TypeSlice, TypeTuple, Variant, WherePredicate,
|
||||
self, AngleBracketedGenericArguments, AssocType, DeriveInput, Field, GenericArgument,
|
||||
GenericParam, Ident, Path, PathArguments, PathSegment, QSelf, Type, TypeArray, TypeGroup,
|
||||
TypeParam, TypeParen, TypePath, TypeSlice, TypeTuple, Variant, WherePredicate,
|
||||
};
|
||||
use synstructure::{self, BindStyle, BindingInfo, VariantAst, VariantInfo};
|
||||
|
||||
|
|
|
@ -2,4 +2,12 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
extern crate darling;
|
||||
extern crate proc_macro2;
|
||||
#[macro_use]
|
||||
extern crate quote;
|
||||
#[macro_use]
|
||||
extern crate syn;
|
||||
extern crate synstructure;
|
||||
|
||||
pub mod cg;
|
||||
|
|
|
@ -3,7 +3,6 @@ name = "malloc_size_of"
|
|||
version = "0.0.1"
|
||||
authors = ["The Servo Project Developers"]
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2018"
|
||||
publish = false
|
||||
|
||||
[lib]
|
||||
|
|
|
@ -46,6 +46,41 @@
|
|||
//! Note: WebRender has a reduced fork of this crate, so that we can avoid
|
||||
//! publishing this crate on crates.io.
|
||||
|
||||
#[cfg(feature = "servo")]
|
||||
extern crate accountable_refcell;
|
||||
extern crate app_units;
|
||||
#[cfg(feature = "servo")]
|
||||
extern crate content_security_policy;
|
||||
#[cfg(feature = "servo")]
|
||||
extern crate crossbeam_channel;
|
||||
extern crate cssparser;
|
||||
extern crate euclid;
|
||||
#[cfg(feature = "servo")]
|
||||
extern crate http;
|
||||
#[cfg(feature = "servo")]
|
||||
extern crate keyboard_types;
|
||||
extern crate selectors;
|
||||
#[cfg(feature = "servo")]
|
||||
extern crate serde;
|
||||
#[cfg(feature = "servo")]
|
||||
extern crate serde_bytes;
|
||||
extern crate servo_arc;
|
||||
extern crate smallbitvec;
|
||||
extern crate smallvec;
|
||||
#[cfg(feature = "servo")]
|
||||
extern crate string_cache;
|
||||
#[cfg(feature = "servo")]
|
||||
extern crate time;
|
||||
#[cfg(feature = "url")]
|
||||
extern crate url;
|
||||
#[cfg(feature = "servo")]
|
||||
extern crate uuid;
|
||||
extern crate void;
|
||||
#[cfg(feature = "webrender_api")]
|
||||
extern crate webrender_api;
|
||||
#[cfg(feature = "servo")]
|
||||
extern crate xml5ever;
|
||||
|
||||
use std::hash::{BuildHasher, Hash};
|
||||
use std::mem::size_of;
|
||||
use std::ops::{Deref, DerefMut, Range};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue