]> git.lizzy.rs Git - rust.git/blob - tests/target/where-clause-rfc.rs
Tidy up and pass tests
[rust.git] / tests / target / where-clause-rfc.rs
1 // rustfmt-indent_style: Block
2
3 fn reflow_list_node_with_rule(node: &CompoundNode, rule: &Rule, args: &[Arg], shape: &Shape)
4 where
5     T: FOo,
6     U: Bar,
7 {
8     let mut effects = HashMap::new();
9 }
10
11 fn reflow_list_node_with_rule(node: &CompoundNode, rule: &Rule, args: &[Arg], shape: &Shape)
12 where
13     T: FOo,
14 {
15     let mut effects = HashMap::new();
16 }
17
18 fn reflow_list_node_with_rule(
19     node: &CompoundNode,
20     rule: &Rule,
21     args: &[Arg],
22     shape: &Shape,
23     shape: &Shape,
24 ) where
25     T: FOo,
26     U: Bar,
27 {
28     let mut effects = HashMap::new();
29 }
30
31 fn reflow_list_node_with_rule(
32     node: &CompoundNode,
33     rule: &Rule,
34     args: &[Arg],
35     shape: &Shape,
36     shape: &Shape,
37 ) where
38     T: FOo,
39 {
40     let mut effects = HashMap::new();
41 }
42
43 fn reflow_list_node_with_rule(
44     node: &CompoundNode,
45     rule: &Rule,
46     args: &[Arg],
47     shape: &Shape,
48 ) -> Option<String>
49 where
50     T: FOo,
51     U: Bar,
52 {
53     let mut effects = HashMap::new();
54 }
55
56 fn reflow_list_node_with_rule(
57     node: &CompoundNode,
58     rule: &Rule,
59     args: &[Arg],
60     shape: &Shape,
61 ) -> Option<String>
62 where
63     T: FOo,
64 {
65     let mut effects = HashMap::new();
66 }
67
68 pub trait Test {
69     fn very_long_method_name<F>(self, f: F) -> MyVeryLongReturnType
70     where
71         F: FnMut(Self::Item) -> bool;
72
73     fn exactly_100_chars1<F>(self, f: F) -> MyVeryLongReturnType
74     where
75         F: FnMut(Self::Item) -> bool;
76 }
77
78 fn very_long_function_name<F>(very_long_argument: F) -> MyVeryLongReturnType
79 where
80     F: FnMut(Self::Item) -> bool,
81 {
82 }
83
84 struct VeryLongTupleStructName<A, B, C, D, E>(LongLongTypename, LongLongTypename, i32, i32)
85 where
86     A: LongTrait;
87
88 struct Exactly100CharsToSemicolon<A, B, C, D, E>(LongLongTypename, i32, i32)
89 where
90     A: LongTrait1234;
91
92 struct AlwaysOnNextLine<LongLongTypename, LongTypename, A, B, C, D, E, F>
93 where
94     A: LongTrait,
95 {
96     x: i32,
97 }
98
99 pub trait SomeTrait<T>
100 where
101     T: Something
102         + Sync
103         + Send
104         + Display
105         + Debug
106         + Copy
107         + Hash
108         + Debug
109         + Display
110         + Write
111         + Read
112         + FromStr,
113 {
114 }
115
116 // #2020
117 impl<'a, 'gcx, 'tcx> ProbeContext<'a, 'gcx, 'tcx> {
118     fn elaborate_bounds<F>(&mut self, bounds: &[ty::PolyTraitRef<'tcx>], mut mk_cand: F)
119     where
120         F: for<'b> FnMut(
121             &mut ProbeContext<'b, 'gcx, 'tcx>,
122             ty::PolyTraitRef<'tcx>,
123             ty::AssociatedItem,
124         ),
125     {
126         // ...
127     }
128 }