Skip to content

Commit

Permalink
fixup! refactor(hydroflow_lang): require lifetime on perist*() oper…
Browse files Browse the repository at this point in the history
…ators
  • Loading branch information
MingweiSamuel committed Jul 2, 2024
1 parent 5a6802d commit 4bc78c7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
6 changes: 5 additions & 1 deletion hydroflow/src/scheduled/graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,11 @@ impl<'a> Hydroflow<'a> {

let mut op_inst_diagnostics = Vec::new();
meta_graph.insert_node_op_insts_all(&mut op_inst_diagnostics);
assert!(op_inst_diagnostics.is_empty());
assert!(
op_inst_diagnostics.is_empty(),
"Expected no diagnostics, got: {:#?}",
op_inst_diagnostics
);

assert!(self.meta_graph.replace(meta_graph).is_none());
}
Expand Down
13 changes: 4 additions & 9 deletions hydroflow/tests/compile-fail/surface_singleton_badexpr.stderr
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
error[E0308]: mismatched types
--> tests/compile-fail/surface_singleton_badexpr.rs:7:40
|
7 | -> filter(|value| value <= #my_ref)
| ^^^^^^^ expected `&u32`, found integer
|
help: consider removing deref here
|
7 | -> filter(|value| value <= #my_ref)
error: `persist` should have exactly 1 persistence lifetime arguments, actually has 0.
--> tests/compile-fail/surface_singleton_badexpr.rs:6:16
|
6 | -> persist()
| ^^^^^^^
2 changes: 1 addition & 1 deletion hydroflow_lang/src/graph/flat_graph_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -940,7 +940,7 @@ impl FlatGraphBuilder {

self.flat_graph.insert_intermediate_node(
pred_edge,
GraphNode::Operator(parse_quote_spanned! {op_span=> persist() }),
GraphNode::Operator(parse_quote_spanned! {op_span=> persist::<'static>() }), // TODO(mingwei): use 'tick when implemented.
);
self.diagnostics.push(Diagnostic::spanned(
op_span,
Expand Down

0 comments on commit 4bc78c7

Please sign in to comment.