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 Jun 12, 2024
1 parent 6cd71e7 commit 1a7b7bc
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 28 deletions.
2 changes: 1 addition & 1 deletion hydroflow/tests/compile-fail/surface_singleton_nostate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ pub fn main() {
let mut df = hydroflow::hydroflow_syntax! {
my_ref = source_iter(15..=25) -> null();
source_iter(10..=30)
-> persist()
-> persist::<'static>()
-> filter(|value| value <= #my_ref.as_reveal_ref())
-> null();

Expand Down
6 changes: 0 additions & 6 deletions hydroflow/tests/compile-fail/surface_singleton_nostate.stderr
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
error: `persist` should have exactly 1 persistence lifetime arguments, actually has 0.
--> tests/compile-fail/surface_singleton_nostate.rs:6:16
|
6 | -> persist()
| ^^^^^^^^^

error: Cannot reference operator `null`. Only operators with singleton state can be referenced.
--> tests/compile-fail/surface_singleton_nostate.rs:7:41
|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ pub fn main() {
let mut df = hydroflow::hydroflow_syntax! {
my_ref = source_iter(15..=25) -> null();
source_iter(10..=30)
-> persist()
-> persist::<'static>()
-> filter(|value| value <= #my_ref.as_reveal_ref() && value <= #unknown.as_reveal_ref())
-> null();
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@ error: Cannot find referenced name `unknown`; name was never assigned.
6 | -> filter(|value| value <= #my_ref.as_reveal_ref() && value <= #unknown.as_reveal_ref())
| ^^^^^^^

error: `persist` should have exactly 1 persistence lifetime arguments, actually has 0.
--> tests/compile-fail/surface_singleton_nostate_undefined.rs:5:16
|
5 | -> persist()
| ^^^^^^^^^

error: Cannot reference operator `null`. Only operators with singleton state can be referenced.
--> tests/compile-fail/surface_singleton_nostate_undefined.rs:6:41
|
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pub fn main() {
let mut df = hydroflow::hydroflow_syntax! {
source_iter(10..=30)
-> persist()
-> persist::<'static>()
-> filter(|value| value <= #unknown.as_reveal_ref())
-> null();
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,3 @@ error: Cannot find referenced name `unknown`; name was never assigned.
|
5 | -> filter(|value| value <= #unknown.as_reveal_ref())
| ^^^^^^^

error: `persist` should have exactly 1 persistence lifetime arguments, actually has 0.
--> tests/compile-fail/surface_singleton_undefined.rs:4:16
|
4 | -> persist()
| ^^^^^^^^^
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ pub fn main() {
let mut df = hydroflow::hydroflow_syntax! {
my_ref = source_iter(15..=25) -> null();
source_iter(10..=30)
-> persist()
-> persist::<'static>()
-> filter(|value| value <= #unknown.as_reveal_ref() && value <= #my_ref.as_reveal_ref())
-> null();
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@ error: Cannot find referenced name `unknown`; name was never assigned.
6 | -> filter(|value| value <= #unknown.as_reveal_ref() && value <= #my_ref.as_reveal_ref())
| ^^^^^^^

error: `persist` should have exactly 1 persistence lifetime arguments, actually has 0.
--> tests/compile-fail/surface_singleton_undefined_nostate.rs:5:16
|
5 | -> persist()
| ^^^^^^^^^

error: Cannot reference operator `null`. Only operators with singleton state can be referenced.
--> tests/compile-fail/surface_singleton_undefined_nostate.rs:6:78
|
Expand Down

0 comments on commit 1a7b7bc

Please sign in to comment.