forked from mirrors/gecko-dev
		
	 e3d4f01fdf
			
		
	
	
		e3d4f01fdf
		
	
	
	
	
		
			
			<!-- Please describe your changes on the following line: --> Disallow an extraneous space in a function call between the function name and the opening parenthesis in Rust code, while ignoring macro declarations. --- <!-- 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 --all` does not report any errors - [x] `./mach test-tidy --self` does not report any errors - [x] These changes fix #13980 <!-- Either: --> - [x] There are tests for these changes, these are written in - `python/tidy/servo_tidy_tests/rust_tidy.rs` - `python/tidy/servo_tidy_tests/test_tidy.py` - [ ] These changes do not require tests <!-- 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: ccefef5be43b6d174933196fd7552cbbfbdf53d6
		
			
				
	
	
		
			62 lines
		
	
	
	
		
			1.3 KiB
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			62 lines
		
	
	
	
		
			1.3 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 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;
 | |
| 
 | |
| #[foo = "bar,baz"]
 | |
| 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;
 | |
|         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 ; )* ) => ());
 | |
| }
 |