File tree 1 file changed +16
-16
lines changed
src/librustc_data_structures/obligation_forest
1 file changed +16
-16
lines changed Original file line number Diff line number Diff line change @@ -196,6 +196,22 @@ struct Node<O> {
196
196
obligation_tree_id : ObligationTreeId ,
197
197
}
198
198
199
+ impl < O > Node < O > {
200
+ fn new (
201
+ parent : Option < NodeIndex > ,
202
+ obligation : O ,
203
+ obligation_tree_id : ObligationTreeId
204
+ ) -> Node < O > {
205
+ Node {
206
+ obligation,
207
+ state : Cell :: new ( NodeState :: Pending ) ,
208
+ parent,
209
+ dependents : vec ! [ ] ,
210
+ obligation_tree_id,
211
+ }
212
+ }
213
+ }
214
+
199
215
/// The state of one node in some tree within the forest. This
200
216
/// represents the current state of processing for the obligation (of
201
217
/// type `O`) associated with this node.
@@ -725,22 +741,6 @@ impl<O: ForestObligation> ObligationForest<O> {
725
741
}
726
742
}
727
743
728
- impl < O > Node < O > {
729
- fn new (
730
- parent : Option < NodeIndex > ,
731
- obligation : O ,
732
- obligation_tree_id : ObligationTreeId
733
- ) -> Node < O > {
734
- Node {
735
- obligation,
736
- state : Cell :: new ( NodeState :: Pending ) ,
737
- parent,
738
- dependents : vec ! [ ] ,
739
- obligation_tree_id,
740
- }
741
- }
742
- }
743
-
744
744
// I need a Clone closure.
745
745
#[ derive( Clone ) ]
746
746
struct GetObligation < ' a , O > ( & ' a [ Node < O > ] ) ;
You can’t perform that action at this time.
0 commit comments