Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@ error[E0277]: the trait bound `impl dfir_rs::futures::Sink<u32, Error = Infallib
`DemuxVar<Sinks, Error>` implements `dfir_rs::futures::Sink<(usize, Item)>`
and $N others
note: required for `Shape` to implement `DemuxEnumSink<(Pin<&mut impl dfir_rs::futures::Sink<(f64,), Error = Infallible>>, Pin<&mut impl dfir_rs::futures::Sink<(f64, f64), Error = Infallible>>, Pin<&mut impl dfir_rs::futures::Sink<u32, Error = Infallible>>)>`
--> tests/compile-fail/surface_demuxenum_wrongfields_1.rs:5:14
--> tests/compile-fail/surface_demuxenum_wrongfields_1.rs:6:10
|
5 | #[derive(DemuxEnum)]
| ^^^^^^^^^ unsatisfied trait bound introduced in this `derive` macro
| --------- type parameter would need to implement `DemuxEnumSink<(Pin<&mut impl dfir_rs::futures::Sink<(f64,), Error = Infallible>>, Pin<&mut impl dfir_rs::futures::Sink<(f64, f64), Error = Infallible>>, Pin<&mut impl dfir_rs::futures::Sink<u32, Error = Infallible>>)>`
6 | enum Shape {
| ^^^^^
= help: consider manually implementing `DemuxEnumSink<(Pin<&mut impl dfir_rs::futures::Sink<(f64,), Error = Infallible>>, Pin<&mut impl dfir_rs::futures::Sink<(f64, f64), Error = Infallible>>, Pin<&mut impl dfir_rs::futures::Sink<u32, Error = Infallible>>)>` to avoid undesired bounds
note: required by a bound in `demux_enum_guard`
--> tests/compile-fail/surface_demuxenum_wrongfields_1.rs:17:15
|
17 | ]) -> demux_enum::<Shape>();
| ^^^^^^^^^^^^^^^^^^^^^ required by this bound in `demux_enum_guard`
= note: this error originates in the derive macro `DemuxEnum` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `impl dfir_rs::futures::Sink<u32, Error = Infallible>: dfir_rs::futures::Sink<(f64,)>` is not satisfied
--> tests/compile-fail/surface_demuxenum_wrongfields_1.rs:17:15
Expand All @@ -45,18 +45,18 @@ error[E0277]: the trait bound `impl dfir_rs::futures::Sink<u32, Error = Infallib
`DemuxVar<Sinks, Error>` implements `dfir_rs::futures::Sink<(usize, Item)>`
and $N others
note: required for `Shape` to implement `DemuxEnumSink<(Pin<&mut impl dfir_rs::futures::Sink<(f64,), Error = Infallible>>, Pin<&mut impl dfir_rs::futures::Sink<(f64, f64), Error = Infallible>>, Pin<&mut impl dfir_rs::futures::Sink<u32, Error = Infallible>>)>`
--> tests/compile-fail/surface_demuxenum_wrongfields_1.rs:5:14
--> tests/compile-fail/surface_demuxenum_wrongfields_1.rs:6:10
|
5 | #[derive(DemuxEnum)]
| ^^^^^^^^^ unsatisfied trait bound introduced in this `derive` macro
| --------- type parameter would need to implement `DemuxEnumSink<(Pin<&mut impl dfir_rs::futures::Sink<(f64,), Error = Infallible>>, Pin<&mut impl dfir_rs::futures::Sink<(f64, f64), Error = Infallible>>, Pin<&mut impl dfir_rs::futures::Sink<u32, Error = Infallible>>)>`
6 | enum Shape {
| ^^^^^
= help: consider manually implementing `DemuxEnumSink<(Pin<&mut impl dfir_rs::futures::Sink<(f64,), Error = Infallible>>, Pin<&mut impl dfir_rs::futures::Sink<(f64, f64), Error = Infallible>>, Pin<&mut impl dfir_rs::futures::Sink<u32, Error = Infallible>>)>` to avoid undesired bounds
note: required by a bound in `demux_enum_guard`
--> tests/compile-fail/surface_demuxenum_wrongfields_1.rs:17:15
|
17 | ]) -> demux_enum::<Shape>();
| ^^^^^^^^^^^^^^^^^^^^^ required by this bound in `demux_enum_guard`
= note: this error originates in the derive macro `DemuxEnum` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `impl dfir_rs::futures::Sink<u32, Error = Infallible>: dfir_rs::futures::Sink<(f64,)>` is not satisfied
--> tests/compile-fail/surface_demuxenum_wrongfields_1.rs:13:20
Expand All @@ -80,15 +80,15 @@ error[E0277]: the trait bound `impl dfir_rs::futures::Sink<u32, Error = Infallib
`DemuxVar<Sinks, Error>` implements `dfir_rs::futures::Sink<(usize, Item)>`
and $N others
note: required for `Shape` to implement `DemuxEnumSink<(Pin<&mut impl dfir_rs::futures::Sink<(f64,), Error = Infallible>>, Pin<&mut impl dfir_rs::futures::Sink<(f64, f64), Error = Infallible>>, Pin<&mut impl dfir_rs::futures::Sink<u32, Error = Infallible>>)>`
--> tests/compile-fail/surface_demuxenum_wrongfields_1.rs:5:14
--> tests/compile-fail/surface_demuxenum_wrongfields_1.rs:6:10
|
5 | #[derive(DemuxEnum)]
| ^^^^^^^^^ unsatisfied trait bound introduced in this `derive` macro
| --------- type parameter would need to implement `DemuxEnumSink<(Pin<&mut impl dfir_rs::futures::Sink<(f64,), Error = Infallible>>, Pin<&mut impl dfir_rs::futures::Sink<(f64, f64), Error = Infallible>>, Pin<&mut impl dfir_rs::futures::Sink<u32, Error = Infallible>>)>`
6 | enum Shape {
| ^^^^^
= help: consider manually implementing `DemuxEnumSink<(Pin<&mut impl dfir_rs::futures::Sink<(f64,), Error = Infallible>>, Pin<&mut impl dfir_rs::futures::Sink<(f64, f64), Error = Infallible>>, Pin<&mut impl dfir_rs::futures::Sink<u32, Error = Infallible>>)>` to avoid undesired bounds
note: required by a bound in `demux_enum_guard`
--> tests/compile-fail/surface_demuxenum_wrongfields_1.rs:17:15
|
17 | ]) -> demux_enum::<Shape>();
| ^^^^^^^^^^^^^^^^^^^^^ required by this bound in `demux_enum_guard`
= note: this error originates in the derive macro `DemuxEnum` (in Nightly builds, run with -Z macro-backtrace for more info)
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@ error[E0277]: the trait bound `impl dfir_rs::futures::Sink<(u32,), Error = Infal
`DemuxVar<Sinks, Error>` implements `dfir_rs::futures::Sink<(usize, Item)>`
and $N others
note: required for `Shape` to implement `DemuxEnumSink<(Pin<&mut impl dfir_rs::futures::Sink<(f64,), Error = Infallible>>, Pin<&mut impl dfir_rs::futures::Sink<(f64, f64), Error = Infallible>>, Pin<&mut impl dfir_rs::futures::Sink<(u32,), Error = Infallible>>)>`
--> tests/compile-fail/surface_demuxenum_wrongfields_2.rs:5:14
--> tests/compile-fail/surface_demuxenum_wrongfields_2.rs:6:10
|
5 | #[derive(DemuxEnum)]
| ^^^^^^^^^ unsatisfied trait bound introduced in this `derive` macro
| --------- type parameter would need to implement `DemuxEnumSink<(Pin<&mut impl dfir_rs::futures::Sink<(f64,), Error = Infallible>>, Pin<&mut impl dfir_rs::futures::Sink<(f64, f64), Error = Infallible>>, Pin<&mut impl dfir_rs::futures::Sink<(u32,), Error = Infallible>>)>`
6 | enum Shape {
| ^^^^^
= help: consider manually implementing `DemuxEnumSink<(Pin<&mut impl dfir_rs::futures::Sink<(f64,), Error = Infallible>>, Pin<&mut impl dfir_rs::futures::Sink<(f64, f64), Error = Infallible>>, Pin<&mut impl dfir_rs::futures::Sink<(u32,), Error = Infallible>>)>` to avoid undesired bounds
note: required by a bound in `demux_enum_guard`
--> tests/compile-fail/surface_demuxenum_wrongfields_2.rs:17:15
|
17 | ]) -> demux_enum::<Shape>();
| ^^^^^^^^^^^^^^^^^^^^^ required by this bound in `demux_enum_guard`
= note: this error originates in the derive macro `DemuxEnum` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `impl dfir_rs::futures::Sink<(u32,), Error = Infallible>: dfir_rs::futures::Sink<(f64,)>` is not satisfied
--> tests/compile-fail/surface_demuxenum_wrongfields_2.rs:17:15
Expand All @@ -45,18 +45,18 @@ error[E0277]: the trait bound `impl dfir_rs::futures::Sink<(u32,), Error = Infal
`DemuxVar<Sinks, Error>` implements `dfir_rs::futures::Sink<(usize, Item)>`
and $N others
note: required for `Shape` to implement `DemuxEnumSink<(Pin<&mut impl dfir_rs::futures::Sink<(f64,), Error = Infallible>>, Pin<&mut impl dfir_rs::futures::Sink<(f64, f64), Error = Infallible>>, Pin<&mut impl dfir_rs::futures::Sink<(u32,), Error = Infallible>>)>`
--> tests/compile-fail/surface_demuxenum_wrongfields_2.rs:5:14
--> tests/compile-fail/surface_demuxenum_wrongfields_2.rs:6:10
|
5 | #[derive(DemuxEnum)]
| ^^^^^^^^^ unsatisfied trait bound introduced in this `derive` macro
| --------- type parameter would need to implement `DemuxEnumSink<(Pin<&mut impl dfir_rs::futures::Sink<(f64,), Error = Infallible>>, Pin<&mut impl dfir_rs::futures::Sink<(f64, f64), Error = Infallible>>, Pin<&mut impl dfir_rs::futures::Sink<(u32,), Error = Infallible>>)>`
6 | enum Shape {
| ^^^^^
= help: consider manually implementing `DemuxEnumSink<(Pin<&mut impl dfir_rs::futures::Sink<(f64,), Error = Infallible>>, Pin<&mut impl dfir_rs::futures::Sink<(f64, f64), Error = Infallible>>, Pin<&mut impl dfir_rs::futures::Sink<(u32,), Error = Infallible>>)>` to avoid undesired bounds
note: required by a bound in `demux_enum_guard`
--> tests/compile-fail/surface_demuxenum_wrongfields_2.rs:17:15
|
17 | ]) -> demux_enum::<Shape>();
| ^^^^^^^^^^^^^^^^^^^^^ required by this bound in `demux_enum_guard`
= note: this error originates in the derive macro `DemuxEnum` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `impl dfir_rs::futures::Sink<(u32,), Error = Infallible>: dfir_rs::futures::Sink<(f64,)>` is not satisfied
--> tests/compile-fail/surface_demuxenum_wrongfields_2.rs:13:20
Expand All @@ -80,15 +80,15 @@ error[E0277]: the trait bound `impl dfir_rs::futures::Sink<(u32,), Error = Infal
`DemuxVar<Sinks, Error>` implements `dfir_rs::futures::Sink<(usize, Item)>`
and $N others
note: required for `Shape` to implement `DemuxEnumSink<(Pin<&mut impl dfir_rs::futures::Sink<(f64,), Error = Infallible>>, Pin<&mut impl dfir_rs::futures::Sink<(f64, f64), Error = Infallible>>, Pin<&mut impl dfir_rs::futures::Sink<(u32,), Error = Infallible>>)>`
--> tests/compile-fail/surface_demuxenum_wrongfields_2.rs:5:14
--> tests/compile-fail/surface_demuxenum_wrongfields_2.rs:6:10
|
5 | #[derive(DemuxEnum)]
| ^^^^^^^^^ unsatisfied trait bound introduced in this `derive` macro
| --------- type parameter would need to implement `DemuxEnumSink<(Pin<&mut impl dfir_rs::futures::Sink<(f64,), Error = Infallible>>, Pin<&mut impl dfir_rs::futures::Sink<(f64, f64), Error = Infallible>>, Pin<&mut impl dfir_rs::futures::Sink<(u32,), Error = Infallible>>)>`
6 | enum Shape {
| ^^^^^
= help: consider manually implementing `DemuxEnumSink<(Pin<&mut impl dfir_rs::futures::Sink<(f64,), Error = Infallible>>, Pin<&mut impl dfir_rs::futures::Sink<(f64, f64), Error = Infallible>>, Pin<&mut impl dfir_rs::futures::Sink<(u32,), Error = Infallible>>)>` to avoid undesired bounds
note: required by a bound in `demux_enum_guard`
--> tests/compile-fail/surface_demuxenum_wrongfields_2.rs:17:15
|
17 | ]) -> demux_enum::<Shape>();
| ^^^^^^^^^^^^^^^^^^^^^ required by this bound in `demux_enum_guard`
= note: this error originates in the derive macro `DemuxEnum` (in Nightly builds, run with -Z macro-backtrace for more info)
15 changes: 8 additions & 7 deletions hydro_lang/tests/compile-fail/send_lifetime.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ error: lifetime may not live long enough
| -- -- lifetime `'b` defined here
| |
| lifetime `'a` defined here
7 | p1.source_iter(q!(0..10)).send(p2, TCP.fail_stop().bincode()).for_each(q!(|n| println!("{}", n)));
7 | p1.source_iter(q!(0..10))
| ^^^^^^^^^^^^^^^^^^^^^^^^^ argument requires that `'b` must outlive `'a`
|
= help: consider adding the following bound: `'b: 'a`
Expand All @@ -16,12 +16,13 @@ error: lifetime may not live long enough
error: lifetime may not live long enough
--> tests/compile-fail/send_lifetime.rs:7:5
|
6 | fn test<'a, 'b>(p1: &Process<'a, P1>, p2: &Process<'b, P2>) {
| -- -- lifetime `'b` defined here
| |
| lifetime `'a` defined here
7 | p1.source_iter(q!(0..10)).send(p2, TCP.fail_stop().bincode()).for_each(q!(|n| println!("{}", n)));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ argument requires that `'a` must outlive `'b`
6 | fn test<'a, 'b>(p1: &Process<'a, P1>, p2: &Process<'b, P2>) {
| -- -- lifetime `'b` defined here
| |
| lifetime `'a` defined here
7 | / p1.source_iter(q!(0..10))
8 | | .send(p2, TCP.fail_stop().bincode())
| |____________________________________________^ argument requires that `'a` must outlive `'b`
|
= help: consider adding the following bound: `'a: 'b`
= note: requirement occurs because of the type `hydro_lang::prelude::Process<'_, P2>`, which makes the generic argument `'_` invariant
Expand Down
Loading
Loading