fune/servo/python/tidy/servo_tidy_tests/rust_tidy.rs
Clément DAVID 14926dcf7c servo: Merge #18179 - Automatically verify that derive() lists are alphabetically ordered #… (from davidcl:master); r=jdm
<!-- 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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 474369618965569407d127b1e8c481e757cc59d3

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 421aa68def8e17f70580477a4203494db3b69382
2017-08-23 17:18:31 -05:00

82 lines
1.7 KiB
Rust

/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use app_units::Au;
use azure::azure_hl::{ AntialiasMode, Color, ColorPattern, CompositionOp };
use azure::azure_hl::{AntialiasMode, Color,
ColorPattern, CompositionOp};
use euclid::Size2D;
use azure::azure::AzIntSize;
use azure::azure::{AzIntSize};
use std;
mod paint_context;
pub mod display_list;
mod test::{
};
extern crate webrender_api;
extern crate style_traits;
#[foo = "bar,baz"]
#[derive(Copy,Debug, ComputeSquaredDistance)]
impl test {
fn test_fun(y:f32)->f32{
let x=5;
x = x-1;
x = x*x;
let z = match y {
1 =>2,
2 => 1,
};
let z = &Vec<T>;
struct Member {
member_name:"Foo"
member_id:5
}
}
fn test_fun2(y : &String, z : &Vec<f32>, r: &Root<isize>) -> () {
let x = true;
x
&& x;
if x {
;
}
else {
;
}
}
type Text_Fun3 = fn( i32) -> i32;
fn test_fun3<Text_Fun3>( y: Text_Fun3) {
let (x, y) = (1, 2) // Should not trigger
test_fun( x);
test_fun (y);
}
// Should not be triggered
macro_rules! test_macro ( ( $( $fun:ident = $flag:ident ; )* ) => ());
let var
= "val";
fn test_fun4()
{
}
let var = if true {
"true"
} else { // Should not trigger
"false"
} // Should not trigger
if true { // Double space after keyword
42
} else {
let xif = 42 in { xif } // Should not trigger
}
}