]> git.lizzy.rs Git - rust.git/blob - src/tools/rustfmt/tests/target/where-clause-rfc.rs
Merge commit 'e36a20c24f35a4cee82bbdc600289104c9237c22' into ra-sync-and-pms-component
[rust.git] / src / tools / rustfmt / tests / target / where-clause-rfc.rs
1 fn reflow_list_node_with_rule(node: &CompoundNode, rule: &Rule, args: &[Arg], shape: &Shape)
2 where
3     T: FOo,
4     U: Bar,
5 {
6     let mut effects = HashMap::new();
7 }
8
9 fn reflow_list_node_with_rule(node: &CompoundNode, rule: &Rule, args: &[Arg], shape: &Shape)
10 where
11     T: FOo,
12 {
13     let mut effects = HashMap::new();
14 }
15
16 fn reflow_list_node_with_rule(
17     node: &CompoundNode,
18     rule: &Rule,
19     args: &[Arg],
20     shape: &Shape,
21     shape: &Shape,
22 ) where
23     T: FOo,
24     U: Bar,
25 {
26     let mut effects = HashMap::new();
27 }
28
29 fn reflow_list_node_with_rule(
30     node: &CompoundNode,
31     rule: &Rule,
32     args: &[Arg],
33     shape: &Shape,
34     shape: &Shape,
35 ) where
36     T: FOo,
37 {
38     let mut effects = HashMap::new();
39 }
40
41 fn reflow_list_node_with_rule(
42     node: &CompoundNode,
43     rule: &Rule,
44     args: &[Arg],
45     shape: &Shape,
46 ) -> Option<String>
47 where
48     T: FOo,
49     U: Bar,
50 {
51     let mut effects = HashMap::new();
52 }
53
54 fn reflow_list_node_with_rule(
55     node: &CompoundNode,
56     rule: &Rule,
57     args: &[Arg],
58     shape: &Shape,
59 ) -> Option<String>
60 where
61     T: FOo,
62 {
63     let mut effects = HashMap::new();
64 }
65
66 pub trait Test {
67     fn very_long_method_name<F>(self, f: F) -> MyVeryLongReturnType
68     where
69         F: FnMut(Self::Item) -> bool;
70
71     fn exactly_100_chars1<F>(self, f: F) -> MyVeryLongReturnType
72     where
73         F: FnMut(Self::Item) -> bool;
74 }
75
76 fn very_long_function_name<F>(very_long_argument: F) -> MyVeryLongReturnType
77 where
78     F: FnMut(Self::Item) -> bool,
79 {
80 }
81
82 struct VeryLongTupleStructName<A, B, C, D, E>(LongLongTypename, LongLongTypename, i32, i32)
83 where
84     A: LongTrait;
85
86 struct Exactly100CharsToSemicolon<A, B, C, D, E>(LongLongTypename, i32, i32)
87 where
88     A: LongTrait1234;
89
90 struct AlwaysOnNextLine<LongLongTypename, LongTypename, A, B, C, D, E, F>
91 where
92     A: LongTrait,
93 {
94     x: i32,
95 }
96
97 pub trait SomeTrait<T>
98 where
99     T: Something
100         + Sync
101         + Send
102         + Display
103         + Debug
104         + Copy
105         + Hash
106         + Debug
107         + Display
108         + Write
109         + Read
110         + FromStr,
111 {
112 }
113
114 // #2020
115 impl<'a, 'gcx, 'tcx> ProbeContext<'a, 'gcx, 'tcx> {
116     fn elaborate_bounds<F>(&mut self, bounds: &[ty::PolyTraitRef<'tcx>], mut mk_cand: F)
117     where
118         F: for<'b> FnMut(
119             &mut ProbeContext<'b, 'gcx, 'tcx>,
120             ty::PolyTraitRef<'tcx>,
121             ty::AssociatedItem,
122         ),
123     {
124         // ...
125     }
126 }
127
128 // #2497
129 fn handle_update<'a, Tab, Conn, R, C>(
130     executor: &Executor<PooledConnection<ConnectionManager<Conn>>>,
131     change_set: &'a C,
132 ) -> ExecutionResult
133 where
134     &'a C: Identifiable + AsChangeset<Target = Tab> + HasTable<Table = Tab>,
135     <&'a C as AsChangeset>::Changeset: QueryFragment<Conn::Backend>,
136     Tab: Table + HasTable<Table = Tab>,
137     Tab::PrimaryKey: EqAll<<&'a C as Identifiable>::Id>,
138     Tab::FromClause: QueryFragment<Conn::Backend>,
139     Tab: FindDsl<<&'a C as Identifiable>::Id>,
140     Find<Tab, <&'a C as Identifiable>::Id>: IntoUpdateTarget<Table = Tab>,
141     <Find<Tab, <&'a C as Identifiable>::Id> as IntoUpdateTarget>::WhereClause:
142         QueryFragment<Conn::Backend>,
143     Tab::Query: FilterDsl<<Tab::PrimaryKey as EqAll<<&'a C as Identifiable>::Id>>::Output>,
144     Filter<Tab::Query, <Tab::PrimaryKey as EqAll<<&'a C as Identifiable>::Id>>::Output>: LimitDsl,
145     Limit<Filter<Tab::Query, <Tab::PrimaryKey as EqAll<<&'a C as Identifiable>::Id>>::Output>>:
146         QueryDsl
147             + BoxedDsl<
148                 'a,
149                 Conn::Backend,
150                 Output = BoxedSelectStatement<'a, R::SqlType, Tab, Conn::Backend>,
151             >,
152     R: LoadingHandler<Conn, Table = Tab, SqlType = Tab::SqlType>
153         + GraphQLType<TypeInfo = (), Context = ()>,
154 {
155     unimplemented!()
156 }