diff options
| author | Nick Cameron <ncameron@mozilla.com> | 2017-03-09 14:21:20 +1300 |
|---|---|---|
| committer | Nick Cameron <ncameron@mozilla.com> | 2017-03-09 14:21:20 +1300 |
| commit | 6025492245ec0028b09477261418176a197b3ebc (patch) | |
| tree | 5aea68b0054a681226f2b15a036f6a1de89d3784 /tests/source | |
| parent | b820d50ec06487eb5490b4a0048fdae76de11db8 (diff) | |
Implement where_style Rfc
Diffstat (limited to 'tests/source')
| -rw-r--r-- | tests/source/where-clause-rfc.rs | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/tests/source/where-clause-rfc.rs b/tests/source/where-clause-rfc.rs new file mode 100644 index 00000000000..d8a014c4a91 --- /dev/null +++ b/tests/source/where-clause-rfc.rs @@ -0,0 +1,44 @@ +// rustfmt-fn_args_layout: Block +// rustfmt-where_style: Rfc + +fn reflow_list_node_with_rule(node: &CompoundNode, rule: &Rule, args: &[Arg], shape: &Shape) where T: FOo, U: Bar { + let mut effects = HashMap::new(); +} + +fn reflow_list_node_with_rule(node: &CompoundNode, rule: &Rule, args: &[Arg], shape: &Shape) where T: FOo { + let mut effects = HashMap::new(); +} + +fn reflow_list_node_with_rule(node: &CompoundNode, rule: &Rule, args: &[Arg], shape: &Shape, shape: &Shape) where T: FOo, U: Bar { + let mut effects = HashMap::new(); +} + +fn reflow_list_node_with_rule(node: &CompoundNode, rule: &Rule, args: &[Arg], shape: &Shape, shape: &Shape) where T: FOo { + let mut effects = HashMap::new(); +} + +fn reflow_list_node_with_rule(node: &CompoundNode, rule: &Rule, args: &[Arg], shape: &Shape) -> Option<String> where T: FOo, U: Bar { + let mut effects = HashMap::new(); +} + +fn reflow_list_node_with_rule(node: &CompoundNode, rule: &Rule, args: &[Arg], shape: &Shape) -> Option<String> where T: FOo { + let mut effects = HashMap::new(); +} + +pub trait Test { + fn very_long_method_name<F>(self, f: F) -> MyVeryLongReturnType where F: FnMut(Self::Item) -> bool; + + fn exactly_100_chars1<F>(self, f: F) -> MyVeryLongReturnType where F: FnMut(Self::Item) -> bool; +} + +fn very_long_function_name<F>(very_long_argument: F) -> MyVeryLongReturnType where F: FnMut(Self::Item) -> bool { } + +struct VeryLongTupleStructName<A, B, C, D, E>(LongLongTypename, LongLongTypename, i32, i32) where A: LongTrait; + +struct Exactly100CharsToSemicolon<A, B, C, D, E> + (LongLongTypename, i32, i32) + where A: LongTrait1234; + +struct AlwaysOnNextLine<LongLongTypename, LongTypename, A, B, C, D, E, F> where A: LongTrait { + x: i32 +} |
