2016-04-07 17:15:11 +03:00
|
|
|
/* 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 euclid::size::Size2D;
|
|
|
|
use azure::azure::AzIntSize;
|
2016-05-27 15:11:17 +03:00
|
|
|
use azure::azure::{AzIntSize};
|
2016-04-07 17:15:11 +03:00
|
|
|
|
|
|
|
use std;
|
|
|
|
|
|
|
|
mod paint_context;
|
|
|
|
pub mod display_list;
|
|
|
|
mod test::{
|
|
|
|
};
|
|
|
|
|
|
|
|
extern crate webrender_traits;
|
|
|
|
extern crate style_traits;
|
|
|
|
|
2016-06-16 22:36:42 +03:00
|
|
|
#[foo = "bar,baz"]
|
2016-04-07 17:15:11 +03:00
|
|
|
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>;
|
2016-05-12 02:27:37 +03:00
|
|
|
struct Member {
|
|
|
|
member_name:"Foo"
|
|
|
|
member_id:5
|
|
|
|
}
|
2016-04-07 17:15:11 +03:00
|
|
|
}
|
|
|
|
|
2016-06-05 16:48:58 +03:00
|
|
|
fn test_fun2(y : &String, z : &Vec<f32>, r: &Root<isize>) -> f32 {
|
2016-04-22 20:40:06 +03:00
|
|
|
let x = true;
|
|
|
|
x
|
|
|
|
&& x;
|
2016-07-05 02:52:19 +03:00
|
|
|
if x {
|
|
|
|
;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
;
|
|
|
|
}
|
2016-04-07 17:15:11 +03:00
|
|
|
}
|
2016-04-22 20:40:06 +03:00
|
|
|
|
2016-09-24 06:16:57 +03:00
|
|
|
type Text_Fun3 = fn( i32) -> i32;
|
|
|
|
|
|
|
|
fn test_fun3<Text_Fun3>( y: Text_Fun3) {
|
2016-10-31 21:03:32 +03:00
|
|
|
let (x, y) = (1, 2) // Should not trigger
|
|
|
|
test_fun( x);
|
|
|
|
test_fun (y);
|
2016-09-24 06:16:57 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
// Should not be triggered
|
|
|
|
macro_rules! test_macro ( ( $( $fun:ident = $flag:ident ; )* ) => ());
|
2016-04-07 17:15:11 +03:00
|
|
|
}
|