Skip to content

the parameter type O may not live long enough #1178

@kasbah

Description

@kasbah

$ ddlog --version
DDlog v1.2.3 (cd1164ee3aed56734a3dd114a71ce4902fd7e3ef)
Copyright (c) 2019-2021 VMware, Inc. (MIT License)

$ rustc --version
rustc 1.82.0 (f6e511eec 2024-10-15)

Following the tutorial I am running into this when running cargo build:

error[E0310]: the parameter type `O` may not live long enough
  --> differential_datalog/src/dataflow/consolidate.rs:46:5
   |
46 | /     fn consolidate_arranged_named(
47 | |         &self,
48 | |         name: &str,
49 | |     ) -> Arranged<S, TraceAgent<OrdKeySpine<D, S::Timestamp, R, O>>> {
   | |                                                                    ^
   | |                                                                    |
   | |____________________________________________________________________the parameter type `O` must be valid for the static lifetime...
   |                                                                      ...so that the type `Rc<OrdKeyBatch<D, <S as ScopeParent>::Timestamp, R, O>>` will meet its required lifetime bounds
   |
help: consider adding an explicit lifetime bound
   |
42 |     O: OrdOffset + 'static,
   |                  +++++++++

Compiling proc-macro2 v1.0.89
   Compiling unicode-ident v1.0.13
   Compiling autocfg v1.4.0
   Compiling syn v1.0.109
   Compiling libc v0.2.161
   Compiling serde v1.0.214
   Compiling cfg-if v1.0.0
   Compiling version_check v0.9.5
   Compiling crossbeam-utils v0.8.20
   Compiling byteorder v1.5.0
   Compiling unicode-xid v0.2.6
   Compiling unicode-width v0.1.14
   Compiling abomonation v0.7.3
   Compiling futures-core v0.3.31
   Compiling pin-utils v0.1.0
   Compiling timely_logging v0.12.0 (https://github.com/ddlog-dev/timely-dataflow?branch=ddlog-4#5b999d00)
   Compiling pin-project-lite v0.2.15
   Compiling futures-task v0.3.31
   Compiling num-traits v0.2.19
   Compiling slab v0.4.9
   Compiling getopts v0.2.21
   Compiling timely_bytes v0.12.0 (https://github.com/ddlog-dev/timely-dataflow?branch=ddlog-4#5b999d00)
   Compiling memoffset v0.6.5
   Compiling quote v1.0.37
   Compiling crossbeam-channel v0.5.13
   Compiling syn v2.0.87
   Compiling getrandom v0.2.15
   Compiling once_cell v1.20.2
   Compiling proc-macro-hack v0.5.20+deprecated
   Compiling fnv v1.0.7
   Compiling bytecheck v0.5.2
   Compiling memchr v2.7.4
   Compiling rand_core v0.6.4
   Compiling num-bigint v0.3.3
   Compiling rkyv v0.6.7
   Compiling simdutf8 v0.1.5
   Compiling num-integer v0.1.46
   Compiling num-rational v0.3.2
   Compiling standback v0.2.17
   Compiling serde_json v1.0.132
   Compiling itoa v1.0.11
   Compiling seahash v4.1.0
   Compiling ryu v1.0.18
   Compiling tinyvec_macros v0.1.1
   Compiling tinyvec v1.8.0
   Compiling csv-core v0.1.11
   Compiling num-iter v0.1.45
   Compiling const_fn v0.4.10
   Compiling stable_deref_trait v1.2.0
   Compiling sequence_trie v0.3.6
   Compiling time v0.2.27
   Compiling dyn-clone v1.0.17
   Compiling static_assertions v1.1.0
   Compiling lock_api v0.4.12
   Compiling parking_lot_core v0.9.10
   Compiling ahash v0.7.8
   Compiling smallvec v1.13.2
   Compiling scopeguard v1.2.0
   Compiling hashbrown v0.14.5
   Compiling version_check v0.1.5
   Compiling siphasher v0.3.11
   Compiling hashbrown v0.12.3
   Compiling parking_lot v0.12.3
   Compiling phf_shared v0.10.0
   Compiling bitflags v0.4.0
   Compiling nom v4.2.3
   Compiling nix v0.5.1
   Compiling libtool v0.1.1
   Compiling dashmap v5.5.3
   Compiling encode_unicode v0.1.3
   Compiling playpen v0.1.0 (/home/kaspar/projects/ddlog/playpen_ddlog)
   Compiling rustop v1.1.4
   Compiling internment v0.5.6
   Compiling rustyline v1.0.0
   Compiling synstructure v0.12.6
   Compiling serde_derive v1.0.214
   Compiling futures-macro v0.3.31
   Compiling zerocopy-derive v0.7.35
   Compiling abomonation_derive v0.5.0
   Compiling ptr_meta_derive v0.1.4
   Compiling bytecheck_derive v0.5.2
   Compiling rkyv_derive v0.6.7
   Compiling time-macros-impl v0.1.2
   Compiling futures-util v0.3.31
   Compiling ptr_meta v0.1.4
   Compiling ddlog_derive v0.1.0 (/home/kaspar/projects/ddlog/playpen_ddlog/ddlog_derive)
   Compiling enum-primitive-derive v0.2.2
   Compiling time-macros v0.1.1
   Compiling zerocopy v0.7.35
   Compiling ppv-lite86 v0.2.20
   Compiling rand_chacha v0.3.1
   Compiling rand v0.8.5
   Compiling twox-hash v1.6.3
   Compiling phf_generator v0.10.0
   Compiling phf_macros v0.10.0
   Compiling phf v0.10.1
   Compiling timely_communication v0.12.0 (https://github.com/ddlog-dev/timely-dataflow?branch=ddlog-4#5b999d00)
   Compiling csv v1.3.0
   Compiling num-complex v0.3.1
   Compiling triomphe v0.1.14
   Compiling ordered-float v2.10.1
   Compiling erased-serde v0.3.31
   Compiling timely v0.12.0 (https://github.com/ddlog-dev/timely-dataflow?branch=ddlog-4#5b999d00)
   Compiling num v0.3.1
   Compiling differential-dataflow v0.12.0 (https://github.com/ddlog-dev/differential-dataflow?branch=ddlog-4#f225896b)
   Compiling ddshow-types v0.1.1 (https://github.com/ddlog-dev/ddshow?branch=ddlog-4#376e0c80)
   Compiling ddlog_profiler v0.1.0 (/home/kaspar/projects/ddlog/playpen_ddlog/ddlog_profiler)
   Compiling dogsdogsdogs v0.1.0 (https://github.com/ddlog-dev/differential-dataflow?branch=ddlog-4#f225896b)
   Compiling ddshow-sink v0.1.1 (https://github.com/ddlog-dev/ddshow?branch=ddlog-4#376e0c80)
   Compiling differential_datalog v0.1.0 (/home/kaspar/projects/ddlog/playpen_ddlog/differential_datalog)
error[E0310]: the parameter type `O` may not live long enough
  --> differential_datalog/src/dataflow/consolidate.rs:46:5
   |
46 | /     fn consolidate_arranged_named(
47 | |         &self,
48 | |         name: &str,
49 | |     ) -> Arranged<S, TraceAgent<OrdKeySpine<D, S::Timestamp, R, O>>> {
   | |                                                                    ^
   | |                                                                    |
   | |____________________________________________________________________the parameter type `O` must be valid for the static lifetime...
   |                                                                      ...so that the type `Rc<OrdKeyBatch<D, <S as ScopeParent>::Timestamp, R, O>>` will meet its required lifetime bounds
   |
help: consider adding an explicit lifetime bound
   |
42 |     O: OrdOffset + 'static,
   |                  +++++++++

error[E0310]: the parameter type `O` may not live long enough
  --> differential_datalog/src/dataflow/consolidate.rs:49:10
   |
49 |     ) -> Arranged<S, TraceAgent<OrdKeySpine<D, S::Timestamp, R, O>>> {
   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |          |
   |          the parameter type `O` must be valid for the static lifetime...
   |          ...so that the type `Rc<OrdKeyBatch<D, <S as ScopeParent>::Timestamp, R, O>>` will meet its required lifetime bounds
   |
help: consider adding an explicit lifetime bound
   |
42 |     O: OrdOffset + 'static,
   |                  +++++++++

error[E0310]: the parameter type `O` may not live long enough
  --> differential_datalog/src/dataflow/consolidate.rs:25:5
   |
25 |     fn consolidate_arranged(&self) -> Arranged<S, TraceAgent<OrdKeySpine<D, S::Timestamp, R, O>>> {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |     |
   |     the parameter type `O` must be valid for the static lifetime...
   |     ...so that the type `Rc<OrdKeyBatch<D, <S as ScopeParent>::Timestamp, R, O>>` will meet its required lifetime bounds
   |
help: consider adding an explicit lifetime bound
   |
20 |     O: OrdOffset + 'static,
   |                  +++++++++

error[E0310]: the parameter type `O` may not live long enough
  --> differential_datalog/src/dataflow/consolidate.rs:25:39
   |
25 |     fn consolidate_arranged(&self) -> Arranged<S, TraceAgent<OrdKeySpine<D, S::Timestamp, R, O>>> {
   |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |                                       |
   |                                       the parameter type `O` must be valid for the static lifetime...
   |                                       ...so that the type `Rc<OrdKeyBatch<D, <S as ScopeParent>::Timestamp, R, O>>` will meet its required lifetime bounds
   |
help: consider adding an explicit lifetime bound
   |
20 |     O: OrdOffset + 'static,
   |                  +++++++++

error[E0310]: the parameter type `O` may not live long enough
  --> differential_datalog/src/dataflow/consolidate.rs:30:5
   |
30 | /     fn consolidate_arranged_named(
31 | |         &self,
32 | |         name: &str,
33 | |     ) -> Arranged<S, TraceAgent<OrdKeySpine<D, S::Timestamp, R, O>>>;
   | |                                                                     ^
   | |                                                                     |
   | |_____________________________________________________________________the parameter type `O` must be valid for the static lifetime...
   |                                                                       ...so that the type `Rc<OrdKeyBatch<D, <S as ScopeParent>::Timestamp, R, O>>` will meet its required lifetime bounds
   |
help: consider adding an explicit lifetime bound
   |
20 |     O: OrdOffset + 'static,
   |                  +++++++++

error[E0310]: the parameter type `O` may not live long enough
  --> differential_datalog/src/dataflow/consolidate.rs:33:10
   |
33 |     ) -> Arranged<S, TraceAgent<OrdKeySpine<D, S::Timestamp, R, O>>>;
   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |          |
   |          the parameter type `O` must be valid for the static lifetime...
   |          ...so that the type `Rc<OrdKeyBatch<D, <S as ScopeParent>::Timestamp, R, O>>` will meet its required lifetime bounds
   |
help: consider adding an explicit lifetime bound
   |
20 |     O: OrdOffset + 'static,
   |                  +++++++++

error[E0310]: the parameter type `O` may not live long enough
  --> differential_datalog/src/dataflow/distinct.rs:28:1
   |
28 | / pub fn diff_distinct<S, D, R, O>(
29 | |     relation_name: &str,
30 | |     collection: &Collection<S, D, R>,
31 | | ) -> Arranged<S, TraceAgent<OrdKeySpine<D, S::Timestamp, R, O>>>
...  |
38 | |     <O as TryFrom<usize>>::Error: Debug,
39 | |     <O as TryInto<usize>>::Error: Debug,
   | |                                        ^
   | |                                        |
   | |________________________________________the parameter type `O` must be valid for the static lifetime...
   |                                          ...so that the type `Rc<OrdKeyBatch<D, <S as ScopeParent>::Timestamp, R, O>>` will meet its required lifetime bounds
   |
help: consider adding an explicit lifetime bound
   |
37 |     O: OrdOffset + 'static,
   |                  +++++++++

error[E0310]: the parameter type `O` may not live long enough
  --> differential_datalog/src/dataflow/distinct.rs:31:6
   |
31 | ) -> Arranged<S, TraceAgent<OrdKeySpine<D, S::Timestamp, R, O>>>
   |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |      |
   |      the parameter type `O` must be valid for the static lifetime...
   |      ...so that the type `Rc<OrdKeyBatch<D, <S as ScopeParent>::Timestamp, R, O>>` will meet its required lifetime bounds
   |
help: consider adding an explicit lifetime bound
   |
37 |     O: OrdOffset + 'static,
   |                  +++++++++

For more information about this error, try `rustc --explain E0310`.
error: could not compile `differential_datalog` (lib) due to 8 previous errors

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions