mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
add &Root<T> checker 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 #11137 (github issue number if applicable). Either: - [X] There are tests for these changes OR - [ ] These changes do not require tests because _____ 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11190) <!-- Reviewable:end -->
45 lines
934 B
Rust
45 lines
934 B
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 euclid::size::Size2D;
|
|
use azure::azure::AzIntSize;
|
|
use azure::azure::{AzIntSize};
|
|
|
|
use std;
|
|
|
|
mod paint_context;
|
|
pub mod display_list;
|
|
mod test::{
|
|
};
|
|
|
|
extern crate webrender_traits;
|
|
extern crate style_traits;
|
|
|
|
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>) -> f32 {
|
|
let x = true;
|
|
x
|
|
&& x;
|
|
}
|
|
|
|
}
|