Auto merge of #18179 - davidcl:master, r=jdm

Automatically verify that derive() lists are alphabetically ordered #…

<!-- Please describe your changes on the following line: -->
Automatically verify that derive() lists are alphabetically ordered #18172

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #18172 (github issue number if applicable).

<!-- Either: -->
- [X] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18179)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-08-23 17:18:31 -05:00 committed by GitHub
commit 4743696189
197 changed files with 568 additions and 552 deletions

View file

@ -77,7 +77,7 @@ pub use script_msg::{ServiceWorkerMsg, ScopeThings, SWManagerMsg, SWManagerSende
/// The address of a node. Layout sends these back. They must be validated via
/// `from_untrusted_node_address` before they can be used, because we do not trust layout.
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)]
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub struct UntrustedNodeAddress(pub *const c_void);
impl HeapSizeOf for UntrustedNodeAddress {
@ -196,7 +196,7 @@ pub struct NewLayoutInfo {
}
/// When a pipeline is closed, should its browsing context be discarded too?
#[derive(Copy, Clone, PartialEq, Eq, Hash, Deserialize, Serialize)]
#[derive(Clone, Copy, Deserialize, Eq, Hash, PartialEq, Serialize)]
pub enum DiscardBrowsingContext {
/// Discard the browsing context
Yes,
@ -210,7 +210,7 @@ pub enum DiscardBrowsingContext {
/// and it is inactive otherwise.
/// https://html.spec.whatwg.org/multipage/#active-document
/// https://html.spec.whatwg.org/multipage/#fully-active
#[derive(Copy, Clone, PartialEq, Eq, Hash, HeapSizeOf, Debug, Deserialize, Serialize)]
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, HeapSizeOf, PartialEq, Serialize)]
pub enum DocumentActivity {
/// An inactive document
Inactive,
@ -230,7 +230,7 @@ pub enum PaintMetricType {
}
/// The reason why the pipeline id of an iframe is being updated.
#[derive(Copy, Clone, PartialEq, Eq, Hash, HeapSizeOf, Debug, Deserialize, Serialize)]
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, HeapSizeOf, PartialEq, Serialize)]
pub enum UpdatePipelineIdReason {
/// The pipeline id is being updated due to a navigation.
Navigation,
@ -352,7 +352,7 @@ impl fmt::Debug for ConstellationControlMsg {
}
/// Used to determine if a script has any pending asynchronous activity.
#[derive(Copy, Clone, Debug, PartialEq, Deserialize, Serialize)]
#[derive(Clone, Copy, Debug, Deserialize, PartialEq, Serialize)]
pub enum DocumentState {
/// The document has been loaded and is idle.
Idle,
@ -362,7 +362,7 @@ pub enum DocumentState {
/// For a given pipeline, whether any animations are currently running
/// and any animation callbacks are queued
#[derive(Clone, Eq, PartialEq, Deserialize, Serialize, Debug)]
#[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)]
pub enum AnimationState {
/// Animations are active but no callbacks are queued
AnimationsPresent,
@ -390,7 +390,7 @@ pub enum TouchEventType {
/// An opaque identifier for a touch point.
///
/// http://w3c.github.io/touch-events/#widl-Touch-identifier
#[derive(Clone, Copy, Debug, Eq, PartialEq, Deserialize, Serialize)]
#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
pub struct TouchId(pub i32);
/// The mouse button involved in the event.
@ -433,7 +433,7 @@ pub enum CompositorEvent {
}
/// Touchpad pressure phase for `TouchpadPressureEvent`.
#[derive(Copy, Clone, HeapSizeOf, PartialEq, Deserialize, Serialize)]
#[derive(Clone, Copy, Deserialize, HeapSizeOf, PartialEq, Serialize)]
pub enum TouchpadPressurePhase {
/// Pressure before a regular click.
BeforeClick,
@ -463,7 +463,7 @@ pub enum TimerSchedulerMsg {
pub struct TimerEvent(pub TimerSource, pub TimerEventId);
/// Describes the thread that requested the TimerEvent.
#[derive(Copy, Clone, Debug, HeapSizeOf, Deserialize, Serialize)]
#[derive(Clone, Copy, Debug, Deserialize, HeapSizeOf, Serialize)]
pub enum TimerSource {
/// The event was requested from a window (ScriptThread).
FromWindow(PipelineId),
@ -472,7 +472,7 @@ pub enum TimerSource {
}
/// The id to be used for a `TimerEvent` is defined by the corresponding `TimerEventRequest`.
#[derive(PartialEq, Eq, Copy, Clone, Debug, HeapSizeOf, Deserialize, Serialize)]
#[derive(Clone, Copy, Debug, Deserialize, Eq, HeapSizeOf, PartialEq, Serialize)]
pub struct TimerEventId(pub u32);
/// Unit of measurement.
@ -555,7 +555,7 @@ pub trait ScriptThreadFactory {
}
/// Whether the sandbox attribute is present for an iframe element
#[derive(PartialEq, Eq, Copy, Clone, Debug, Deserialize, Serialize)]
#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
pub enum IFrameSandboxState {
/// Sandbox attribute is present
IFrameSandboxed,
@ -695,7 +695,7 @@ pub enum AnimationTickType {
}
/// The scroll state of a stacking context.
#[derive(Copy, Clone, Debug, Deserialize, Serialize)]
#[derive(Clone, Copy, Debug, Deserialize, Serialize)]
pub struct ScrollState {
/// The ID of the scroll root.
pub scroll_root_id: ClipId,
@ -704,7 +704,7 @@ pub struct ScrollState {
}
/// Data about the window size.
#[derive(Copy, Clone, Deserialize, Serialize, HeapSizeOf)]
#[derive(Clone, Copy, Deserialize, HeapSizeOf, Serialize)]
pub struct WindowSizeData {
/// The size of the initial layout viewport, before parsing an
/// http://www.w3.org/TR/css-device-adapt/#initial-viewport
@ -715,7 +715,7 @@ pub struct WindowSizeData {
}
/// The type of window size change.
#[derive(Deserialize, Eq, PartialEq, Serialize, Copy, Clone, HeapSizeOf)]
#[derive(Clone, Copy, Deserialize, Eq, HeapSizeOf, PartialEq, Serialize)]
pub enum WindowSizeType {
/// Initial load.
Initial,
@ -786,7 +786,7 @@ pub enum ConstellationMsg {
}
/// Resources required by workerglobalscopes
#[derive(Serialize, Deserialize, Clone)]
#[derive(Clone, Deserialize, Serialize)]
pub struct WorkerGlobalScopeInit {
/// Chan to a resource thread
pub resource_threads: ResourceThreads,
@ -811,7 +811,7 @@ pub struct WorkerGlobalScopeInit {
}
/// Common entities representing a network load origin
#[derive(Deserialize, Serialize, Clone)]
#[derive(Clone, Deserialize, Serialize)]
pub struct WorkerScriptLoadOrigin {
/// referrer url
pub referrer_url: Option<ServoUrl>,
@ -822,7 +822,7 @@ pub struct WorkerScriptLoadOrigin {
}
/// Errors from executing a paint worklet
#[derive(Debug, Deserialize, Serialize, Clone)]
#[derive(Clone, Debug, Deserialize, Serialize)]
pub enum PaintWorkletError {
/// Execution timed out.
Timeout,
@ -849,7 +849,7 @@ pub trait Painter: SpeculativePainter {
/// The result of executing paint code: the image together with any image URLs that need to be loaded.
/// TODO: this should return a WR display list. https://github.com/servo/servo/issues/17497
#[derive(Debug, Deserialize, Serialize, Clone, HeapSizeOf)]
#[derive(Clone, Debug, Deserialize, HeapSizeOf, Serialize)]
pub struct DrawAPaintImageResult {
/// The image height
pub width: u32,
@ -864,7 +864,7 @@ pub struct DrawAPaintImageResult {
}
/// A Script to Constellation channel.
#[derive(Deserialize, Serialize, Clone)]
#[derive(Clone, Deserialize, Serialize)]
pub struct ScriptToConstellationChan {
/// Sender for communicating with constellation thread.
pub sender: IpcSender<(PipelineId, ScriptMsg)>,