]> git.lizzy.rs Git - rust.git/blob - tests/source/where-clause-rfc.rs
Merge pull request #2023 from topecongiro/issue-2020
[rust.git] / tests / source / where-clause-rfc.rs
1 // rustfmt-fn_args_layout: Block
2 // rustfmt-where_style: Rfc
3
4 fn reflow_list_node_with_rule(node: &CompoundNode, rule: &Rule, args: &[Arg], shape: &Shape) where T: FOo, U: Bar {
5     let mut effects = HashMap::new();
6 }
7
8 fn reflow_list_node_with_rule(node: &CompoundNode, rule: &Rule, args: &[Arg], shape: &Shape) where T: FOo {
9     let mut effects = HashMap::new();
10 }
11
12 fn reflow_list_node_with_rule(node: &CompoundNode, rule: &Rule, args: &[Arg], shape: &Shape, shape: &Shape) where T: FOo, U: Bar {
13     let mut effects = HashMap::new();
14 }
15
16 fn reflow_list_node_with_rule(node: &CompoundNode, rule: &Rule, args: &[Arg], shape: &Shape, shape: &Shape) where T: FOo {
17     let mut effects = HashMap::new();
18 }
19
20 fn reflow_list_node_with_rule(node: &CompoundNode, rule: &Rule, args: &[Arg], shape: &Shape) -> Option<String> where T: FOo, U: Bar {
21     let mut effects = HashMap::new();
22 }
23
24 fn reflow_list_node_with_rule(node: &CompoundNode, rule: &Rule, args: &[Arg], shape: &Shape) -> Option<String> where T: FOo {
25     let mut effects = HashMap::new();
26 }
27
28 pub trait Test {
29     fn very_long_method_name<F>(self, f: F) -> MyVeryLongReturnType where F: FnMut(Self::Item) -> bool;
30
31     fn exactly_100_chars1<F>(self, f: F) -> MyVeryLongReturnType where F: FnMut(Self::Item) -> bool;
32 }
33
34 fn very_long_function_name<F>(very_long_argument: F) -> MyVeryLongReturnType where F: FnMut(Self::Item) -> bool { }
35
36 struct VeryLongTupleStructName<A, B, C, D, E>(LongLongTypename, LongLongTypename, i32, i32) where A: LongTrait;
37
38 struct Exactly100CharsToSemicolon<A, B, C, D, E>
39     (LongLongTypename, i32, i32)
40     where A: LongTrait1234;
41
42 struct AlwaysOnNextLine<LongLongTypename, LongTypename, A, B, C, D, E, F> where A: LongTrait {
43     x: i32
44 }
45
46 pub trait SomeTrait<T>
47     where
48     T: Something + Sync + Send + Display     + Debug     + Copy + Hash + Debug + Display + Write + Read + FromStr
49 {
50 }
51
52 // #2020
53 impl<'a, 'gcx, 'tcx> ProbeContext<'a, 'gcx, 'tcx> {
54     fn elaborate_bounds<F>(&mut self, bounds: &[ty::PolyTraitRef<'tcx>], mut mk_cand: F)
55     where F: for<'b> FnMut(&mut ProbeContext<'b, 'gcx, 'tcx>, ty::PolyTraitRef<'tcx>, ty::AssociatedItem),
56     {
57         // ...
58     }
59 }