|
2 | 2 | // rustfmt-brace_style: AlwaysNextLine
|
3 | 3 | // rustfmt-where_single_line: false
|
4 | 4 |
|
5 |
| -pub trait Trait |
6 |
| -{ |
7 |
| - fn a_one_hundred_column_fn_decl_no_body(&self, aaa: f64, b: f64, c: f64, d: f64, e: f64) -> f64; |
| 5 | +// Top-level functions |
8 | 6 |
|
9 |
| - fn an_over_one_hundred_column_fn_decl_no_body_and_where_clause<T>(&self, a: T, bb: f64) -> f64 where T: Debug; |
| 7 | +// Short function |
| 8 | +fn short_fn(a: f64, b: f64) -> f64; |
10 | 9 |
|
11 |
| - fn an_over_one_hundred_column_fn_decl_no_body_and_where_clause2<T>(&self, aaa: T, bbb: f64) -> f64 where T: Debug; |
| 10 | +// Function with wrapping return type and no where clause |
| 11 | +fn fn_with_long_return_type(a: f64) -> Result<HashMap<String, Vec<(SomeLongTypeName, AnotherLongTypeName, YetAnotherType)>>, Box<dyn Error + Send + Sync + 'static>>; |
12 | 12 |
|
13 |
| - fn an_over_one_hundred_column_fn_decl_with_body(&self, aaaaa: f64, bbbbb: f64, ccc: f64) -> f64 {} |
| 13 | +// Function with non-wrapping return type and where clause |
| 14 | +fn fn_with_short_where<T>(a: f64, b: T) -> f64 where T: Debug; |
14 | 15 |
|
15 |
| - fn an_over_one_hundred_column_fn_decl_with_body_and_where_clause<T>(&self, aaaaa: f64) -> f64 where T: Debug {} |
| 16 | +// Function that wraps at a simple return type |
| 17 | +fn fn_with_wrapping_return_type<T>(aaaaaa: f64, bbbbbb: T, cccccc: f64, dddddd: f64, eeee: f64) -> f64; |
| 18 | + |
| 19 | +// Function that wraps at the where clause |
| 20 | +fn fn_with_wrapping_where_clause<T>(aaaaaa: f64, bbbbbb: T, cccccc: f64, dddddd: f64) -> f64 where T: Debug; |
| 21 | + |
| 22 | +// Function with both wrapping return type and wrapping where clause |
| 23 | +fn fn_with_long_return_and_where<T, U, 'a>(a: f64) -> Result<HashMap<String, Vec<(SomeLongTypeName, AnotherLongTypeName, YetAnotherType)>>, Box<dyn Error + Send + Sync + 'static>> where T: Debug + Display + Clone + Send + Sync + 'static, U: Iterator<Item = &'a T> + ExactSizeIterator; |
| 24 | + |
| 25 | +// Function with wrapping arguments, return type, and where clause |
| 26 | +fn fn_with_everything_long<T, U, 'a>(aaaa: f64, bbbb: f64, cccc: f64, dddd: f64, eeee: f64, ffff: f64) -> Result<HashMap<String, Vec<(SomeLongTypeName, AnotherLongTypeName, YetAnotherType)>>, Box<dyn Error + Send + Sync + 'static>> where T: Debug + Display + Clone + Send + Sync + 'static, U: Iterator<Item = &'a T> + ExactSizeIterator; |
| 27 | + |
| 28 | +// Same variations with bodies |
| 29 | +fn short_fn_with_body(a: f64, b: f64) -> f64 {} |
| 30 | + |
| 31 | +fn fn_with_long_return_type_and_body(a: f64) -> Result<HashMap<String, Vec<(SomeLongTypeName, AnotherLongTypeName, YetAnotherType)>>, Box<dyn Error + Send + Sync + 'static>> {} |
| 32 | + |
| 33 | +fn fn_with_short_where_and_body<T>(a: f64, b: T) -> f64 where T: Debug {} |
| 34 | + |
| 35 | +fn fn_with_wrapping_return_type_and_body<T>(aaaaaa: f64, bbbbbb: T, ccc: f64, ddd: f64, ee: f64) -> f64 {} |
| 36 | + |
| 37 | +fn fn_with_wrapping_where_clause_and_body<T>(aaaaaa: f64, bbbbbb: T, ccc: f64, ddd: f64) -> f64 where T: Debug {} |
| 38 | + |
| 39 | +fn fn_with_long_return_and_where_and_body<T, U, 'a>(a: f64) -> Result<HashMap<String, Vec<(SomeLongTypeName, AnotherLongTypeName, YetAnotherType)>>, Box<dyn Error + Send + Sync + 'static>> where T: Debug + Display + Clone + Send + Sync + 'static, U: Iterator<Item = &'a T> + ExactSizeIterator {} |
| 40 | + |
| 41 | +fn fn_with_everything_long_and_body<T, U, 'a>(aaaa: f64, bbbb: f64, cccc: f64, dddd: f64, eeee: f64, ffff: f64) -> Result<HashMap<String, Vec<(SomeLongTypeName, AnotherLongTypeName, YetAnotherType)>>, Box<dyn Error + Send + Sync + 'static>> where T: Debug + Display + Clone + Send + Sync + 'static, U: Iterator<Item = &'a T> + ExactSizeIterator {} |
| 42 | + |
| 43 | +// Trait methods |
| 44 | +pub trait Trait { |
| 45 | + fn short_method(a: f64, b: f64) -> f64; |
| 46 | + |
| 47 | + fn method_with_long_return(&self) -> Result<HashMap<String, Vec<(SomeLongTypeName, AnotherLongTypeName, YetAnotherType)>>, Box<dyn Error + Send + Sync + 'static>>; |
| 48 | + |
| 49 | + fn method_with_short_where<T>(&self, a: f64, b: T) -> f64 where T: Debug; |
| 50 | + |
| 51 | + fn method_with_wrapping_return_type<T>(self, aaa: f64, bbb: T, ccc: f64, ddd: f64, ee: f64) -> f64; |
| 52 | + |
| 53 | + fn method_with_wrapping_where_clause<T>(aaaaaa: f64, bbbbbb: T, ccc: f64, ddd: f64) -> f64 where T: Debug; |
| 54 | + |
| 55 | + fn method_with_long_return_and_where<T, U, 'a>(self) -> Result<HashMap<String, Vec<(SomeLongTypeName, AnotherLongTypeName, YetAnotherType)>>, Box<dyn Error + Send + Sync + 'static>> where T: Debug + Display + Clone + Send + Sync + 'static, U: Iterator<Item = &'a T> + ExactSizeIterator; |
| 56 | + |
| 57 | + fn method_with_everything_long<T, U, 'a>(&self, aaaa: f64, bbbb: f64, cccc: f64, dddd: f64, eeee: f64) -> Result<HashMap<String, Vec<(SomeLongTypeName, AnotherLongTypeName, YetAnotherType)>>, Box<dyn Error + Send + Sync + 'static>> where T: Debug + Display + Clone + Send + Sync + 'static, U: Iterator<Item = &'a T> + ExactSizeIterator; |
| 58 | + |
| 59 | + // Same variations with bodies |
| 60 | + fn short_method_with_body(a: f64, b: f64) -> f64 {} |
| 61 | + |
| 62 | + fn method_with_long_return_and_body(&self) -> Result<HashMap<String, Vec<(SomeLongTypeName, AnotherLongTypeName, YetAnotherType)>>, Box<dyn Error + Send + Sync + 'static>> {} |
| 63 | + |
| 64 | + fn method_with_short_where_and_body<T>(&self, a: f64, b: T) -> f64 where T: Debug {} |
| 65 | + |
| 66 | + fn method_with_wrapping_return_type_and_body<T>(aaaa: f64, bb: T, cc: f64, d: f64, e: f64) -> f64 {} |
| 67 | + |
| 68 | + fn method_with_wrapping_where_clause_and_body<T>(aaa: f64, bb: T, cc: f64, d: f64) -> f64 where T: Debug {} |
| 69 | + |
| 70 | + fn method_with_long_return_and_where_and_body<T, U, 'a>(self) -> Result<HashMap<String, Vec<(SomeLongTypeName, AnotherLongTypeName, YetAnotherType)>>, Box<dyn Error + Send + Sync + 'static>> where T: Debug + Display + Clone + Send + Sync + 'static, U: Iterator<Item = &'a T> + ExactSizeIterator {} |
| 71 | + |
| 72 | + fn method_with_everything_long_and_body<T, U, 'a>(aaaa: f64, bbbb: f64, cccc: f64, dddd: f64, eeee: f64) -> Result<HashMap<String, Vec<(SomeLongTypeName, AnotherLongTypeName, YetAnotherType)>>, Box<dyn Error + Send + Sync + 'static>> where T: Debug + Display + Clone + Send + Sync + 'static, U: Iterator<Item = &'a T> + ExactSizeIterator {} |
16 | 73 | }
|
0 commit comments