diff --git a/crates/bindings/tests/ui/reducers.stderr b/crates/bindings/tests/ui/reducers.stderr index 3c1ea8ae01..afd4c89d81 100644 --- a/crates/bindings/tests/ui/reducers.stderr +++ b/crates/bindings/tests/ui/reducers.stderr @@ -44,8 +44,13 @@ error[E0277]: the reducer argument `Test` does not implement `SpacetimeType` --> tests/ui/reducers.rs:6:40 | 6 | fn bad_type(_ctx: &ReducerContext, _a: Test) {} - | ^^^^ the trait `SpacetimeType` is not implemented for `Test` + | ^^^^ unsatisfied trait bound | +help: the trait `SpacetimeType` is not implemented for `Test` + --> tests/ui/reducers.rs:3:1 + | +3 | struct Test; + | ^^^^^^^^^^^ = note: if you own the type, try adding `#[derive(SpacetimeType)]` to its definition = help: the following other types implement trait `SpacetimeType`: &T @@ -55,7 +60,7 @@ error[E0277]: the reducer argument `Test` does not implement `SpacetimeType` Arc ArrayType Box - ColId + ColumnAttribute and $N others = note: required for `Test` to implement `ReducerArg` @@ -105,12 +110,22 @@ error[E0277]: `Test` is not a valid reducer return type --> tests/ui/reducers.rs:9:46 | 9 | fn bad_return_type(_ctx: &ReducerContext) -> Test { - | ^^^^ the trait `IntoReducerResult` is not implemented for `Test` + | ^^^^ unsatisfied trait bound | +help: the trait `IntoReducerResult` is not implemented for `Test` + --> tests/ui/reducers.rs:3:1 + | +3 | struct Test; + | ^^^^^^^^^^^ = note: reducers cannot return values -- you can only return `()` or `Result<(), impl Display>` - = help: the following other types implement trait `IntoReducerResult`: - () - Result<(), E> +help: the following other types implement trait `IntoReducerResult` + --> src/rt.rs + | + | impl IntoReducerResult for () { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `()` +... + | impl IntoReducerResult for Result<(), E> { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Result<(), E>` error[E0277]: invalid reducer signature --> tests/ui/reducers.rs:9:4 @@ -161,7 +176,11 @@ error[E0277]: the first argument of a reducer must be `&ReducerContext` | ^^ first argument must be `&ReducerContext` | = help: the trait `ReducerContextArg` is not implemented for `u8` - = help: the trait `ReducerContextArg` is implemented for `&ReducerContext` +help: the trait `ReducerContextArg` is implemented for `&ReducerContext` + --> src/rt.rs + | + | impl ReducerContextArg for &ReducerContext {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0277]: invalid reducer signature --> tests/ui/reducers.rs:23:4 @@ -212,7 +231,11 @@ error[E0277]: the first argument of a reducer must be `&ReducerContext` | ^^^^^^^^^^^^^^ first argument must be `&ReducerContext` | = help: the trait `ReducerContextArg` is not implemented for `ReducerContext` - = help: the trait `ReducerContextArg` is implemented for `&ReducerContext` +help: the trait `ReducerContextArg` is implemented for `&ReducerContext` + --> src/rt.rs + | + | impl ReducerContextArg for &ReducerContext {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0277]: invalid reducer signature --> tests/ui/reducers.rs:26:4 diff --git a/crates/bindings/tests/ui/tables.stderr b/crates/bindings/tests/ui/tables.stderr index 70fb62e2ca..e25cbd853a 100644 --- a/crates/bindings/tests/ui/tables.stderr +++ b/crates/bindings/tests/ui/tables.stderr @@ -14,8 +14,13 @@ error[E0277]: the trait bound `Test: SpacetimeType` is not satisfied --> tests/ui/tables.rs:5:8 | 5 | x: Test, - | ^^^^ the trait `SpacetimeType` is not implemented for `Test` + | ^^^^ unsatisfied trait bound | +help: the trait `SpacetimeType` is not implemented for `Test` + --> tests/ui/tables.rs:1:1 + | +1 | struct Test; + | ^^^^^^^^^^^ = note: if you own the type, try adding `#[derive(SpacetimeType)]` to its definition = help: the following other types implement trait `SpacetimeType`: &T @@ -35,8 +40,13 @@ error[E0277]: the trait bound `Test: Deserialize<'de>` is not satisfied | ----------------------------------- required by a bound introduced by this call 4 | struct Table { 5 | x: Test, - | ^^^^ the trait `Deserialize<'de>` is not implemented for `Test` + | ^^^^ unsatisfied trait bound | +help: the trait `Deserialize<'de>` is not implemented for `Test` + --> tests/ui/tables.rs:1:1 + | +1 | struct Test; + | ^^^^^^^^^^^ = help: the following other types implement trait `Deserialize<'de>`: &'de [u8] &'de str @@ -57,8 +67,13 @@ error[E0277]: the trait bound `Test: Deserialize<'_>` is not satisfied --> tests/ui/tables.rs:5:8 | 5 | x: Test, - | ^^^^ the trait `Deserialize<'_>` is not implemented for `Test` + | ^^^^ unsatisfied trait bound | +help: the trait `Deserialize<'_>` is not implemented for `Test` + --> tests/ui/tables.rs:1:1 + | +1 | struct Test; + | ^^^^^^^^^^^ = help: the following other types implement trait `Deserialize<'de>`: &'de [u8] &'de str @@ -79,8 +94,13 @@ error[E0277]: the trait bound `Test: Serialize` is not satisfied --> tests/ui/tables.rs:5:8 | 5 | x: Test, - | ^^^^ the trait `Serialize` is not implemented for `Test` + | ^^^^ unsatisfied trait bound | +help: the trait `Serialize` is not implemented for `Test` + --> tests/ui/tables.rs:1:1 + | +1 | struct Test; + | ^^^^^^^^^^^ = help: the following other types implement trait `Serialize`: &T () @@ -101,8 +121,13 @@ error[E0277]: the column type `Test` does not implement `SpacetimeType` --> tests/ui/tables.rs:5:8 | 5 | x: Test, - | ^^^^ the trait `SpacetimeType` is not implemented for `Test` + | ^^^^ unsatisfied trait bound | +help: the trait `SpacetimeType` is not implemented for `Test` + --> tests/ui/tables.rs:1:1 + | +1 | struct Test; + | ^^^^^^^^^^^ = note: table column types all must implement `SpacetimeType` = note: if you own the type, try adding `#[derive(SpacetimeType)]` to its definition = help: the following other types implement trait `SpacetimeType`: @@ -148,10 +173,15 @@ error[E0277]: the trait bound `Alpha: IndexScanRangeBounds<(Alpha,), SingleBound --> tests/ui/tables.rs:33:40 | 33 | ctx.db.delta().compound_b().filter(Alpha { beta: 1 }); - | ------ ^^^^^^^^^^^^^^^^^ the trait `FilterableValue` is not implemented for `Alpha` + | ------ ^^^^^^^^^^^^^^^^^ unsatisfied trait bound | | | required by a bound introduced by this call | +help: the trait `FilterableValue` is not implemented for `Alpha` + --> tests/ui/tables.rs:17:1 + | +17 | struct Alpha { + | ^^^^^^^^^^^^ = help: the following other types implement trait `FilterableValue`: &ConnectionId &FunctionVisibility diff --git a/crates/bindings/tests/ui/views.stderr b/crates/bindings/tests/ui/views.stderr index bb460a4f5b..0eda0361ba 100644 --- a/crates/bindings/tests/ui/views.stderr +++ b/crates/bindings/tests/ui/views.stderr @@ -54,13 +54,13 @@ error: Views do not take parameters other than `&ViewContext` or `&AnonymousView 143 | fn sched_table_view(_: &ViewContext, _args: ScheduledTable) -> Vec { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error[E0412]: cannot find type `ScheduledTable` in this scope +error[E0425]: cannot find type `ScheduledTable` in this scope --> tests/ui/views.rs:143:45 | 143 | fn sched_table_view(_: &ViewContext, _args: ScheduledTable) -> Vec { | ^^^^^^^^^^^^^^ not found in this scope -error[E0412]: cannot find type `T` in this scope +error[E0425]: cannot find type `T` in this scope --> tests/ui/views.rs:202:55 | 202 | fn view_nonexistent_table(ctx: &ViewContext) -> Query { @@ -71,7 +71,7 @@ help: you might be missing a type parameter 202 | fn view_nonexistent_table(ctx: &ViewContext) -> Query { | +++ -error[E0412]: cannot find type `T` in this scope +error[E0425]: cannot find type `T` in this scope --> tests/ui/views.rs:202:55 | 202 | fn view_nonexistent_table(ctx: &ViewContext) -> Query { @@ -83,9 +83,14 @@ error[E0277]: the trait bound `ViewKind: ViewKindTrait` is not s 106 | #[view(name = view_def_wrong_context, public)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `ViewKindTrait` is not implemented for `ViewKind` | - = help: the following other types implement trait `ViewKindTrait`: - ViewKind - ViewKind +help: the following other types implement trait `ViewKindTrait` + --> src/rt.rs + | + | impl ViewKindTrait for ViewKind { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `ViewKind` +... + | impl ViewKindTrait for ViewKind { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `ViewKind` = note: this error originates in the attribute macro `view` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0276]: impl has stricter requirements than trait @@ -172,19 +177,19 @@ error[E0599]: no method named `delete` found for reference `&test__ViewHandle` i candidate #1: `similar::algorithms::DiffHook` candidate #2: `spacetimedb::Table` -error[E0599]: no method named `delete` found for struct `UniqueColumnReadOnly` in the current scope +error[E0599]: no method named `delete` found for struct `UniqueColumnReadOnly` in the current scope --> tests/ui/views.rs:50:30 | 50 | read_only.db.test().id().delete(&0); | ^^^^^^ method not found in `UniqueColumnReadOnly` -error[E0599]: no method named `update` found for struct `UniqueColumnReadOnly` in the current scope +error[E0599]: no method named `update` found for struct `UniqueColumnReadOnly` in the current scope --> tests/ui/views.rs:57:30 | 57 | read_only.db.test().id().update(Test { id: 0, x: 0 }); | ^^^^^^ method not found in `UniqueColumnReadOnly` -error[E0599]: no method named `delete` found for struct `RangedIndexReadOnly` in the current scope +error[E0599]: no method named `delete` found for struct `RangedIndexReadOnly` in the current scope --> tests/ui/views.rs:64:29 | 64 | read_only.db.test().x().delete(0u32..); @@ -207,9 +212,13 @@ error[E0277]: The first parameter of a `#[view]` must be `&ViewContext` or `&Ano 107 | fn view_def_wrong_context(_: &ReducerContext) -> Vec { | ^^^^^^^^^^^^^^ the trait `ViewContextArg` is not implemented for `ReducerContext` | - = help: the following other types implement trait `ViewContextArg`: - AnonymousViewContext - ViewContext +help: the following other types implement trait `ViewContextArg` + --> src/rt.rs + | + | impl ViewContextArg for ViewContext {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `ViewContext` + | impl ViewContextArg for AnonymousViewContext {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `AnonymousViewContext` error[E0599]: no function or associated item named `invoke` found for struct `ViewDispatcher` in the current scope --> tests/ui/views.rs:106:1 @@ -248,12 +257,24 @@ error[E0277]: Views must return `Vec` or `Option` where `T` is a `Spacetim --> tests/ui/views.rs:129:46 | 129 | fn view_def_wrong_return(_: &ViewContext) -> Player { - | ^^^^^^ the trait `ViewReturn` is not implemented for `Player` + | ^^^^^^ unsatisfied trait bound | - = help: the following other types implement trait `ViewReturn`: - Option - Query - Vec +help: the trait `ViewReturn` is not implemented for `Player` + --> tests/ui/views.rs:68:1 + | + 68 | struct Player { + | ^^^^^^^^^^^^^ +help: the following other types implement trait `ViewReturn` + --> src/rt.rs + | + | impl ViewReturn for Vec { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Vec` +... + | impl ViewReturn for Option { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Option` +... + | impl ViewReturn for Query { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Query` error[E0277]: invalid view signature --> tests/ui/views.rs:128:1 @@ -303,8 +324,13 @@ error[E0277]: the trait bound `NotSpacetimeType: SpacetimeType` is not satisfied --> tests/ui/views.rs:137:71 | 137 | fn view_def_returns_not_a_spacetime_type(_: &AnonymousViewContext) -> Option { - | ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `SpacetimeType` is not implemented for `NotSpacetimeType` + | ^^^^^^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound | +help: the trait `SpacetimeType` is not implemented for `NotSpacetimeType` + --> tests/ui/views.rs:73:1 + | + 73 | struct NotSpacetimeType {} + | ^^^^^^^^^^^^^^^^^^^^^^^ = note: if you own the type, try adding `#[derive(SpacetimeType)]` to its definition = help: the following other types implement trait `SpacetimeType`: &T @@ -314,7 +340,7 @@ error[E0277]: the trait bound `NotSpacetimeType: SpacetimeType` is not satisfied Arc ArrayType Box - ColId + ColumnAttribute and $N others = note: required for `Option` to implement `ViewReturn` @@ -322,8 +348,13 @@ error[E0277]: the trait bound `NotSpacetimeType: Serialize` is not satisfied --> tests/ui/views.rs:137:71 | 137 | fn view_def_returns_not_a_spacetime_type(_: &AnonymousViewContext) -> Option { - | ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Serialize` is not implemented for `NotSpacetimeType` + | ^^^^^^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound | +help: the trait `Serialize` is not implemented for `NotSpacetimeType` + --> tests/ui/views.rs:73:1 + | + 73 | struct NotSpacetimeType {} + | ^^^^^^^^^^^^^^^^^^^^^^^ = help: the following other types implement trait `Serialize`: &T () @@ -362,8 +393,13 @@ error[E0277]: the trait bound `NotSpacetimeType: SpacetimeType` is not satisfied --> tests/ui/views.rs:137:71 | 137 | fn view_def_returns_not_a_spacetime_type(_: &AnonymousViewContext) -> Option { - | ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `SpacetimeType` is not implemented for `NotSpacetimeType` + | ^^^^^^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound | +help: the trait `SpacetimeType` is not implemented for `NotSpacetimeType` + --> tests/ui/views.rs:73:1 + | + 73 | struct NotSpacetimeType {} + | ^^^^^^^^^^^^^^^^^^^^^^^ = note: if you own the type, try adding `#[derive(SpacetimeType)]` to its definition = help: the following other types implement trait `SpacetimeType`: &T @@ -373,7 +409,7 @@ error[E0277]: the trait bound `NotSpacetimeType: SpacetimeType` is not satisfied Arc ArrayType Box - ColId + ColumnAttribute and $N others = note: required for `Option` to implement `SpacetimeType` @@ -409,14 +445,19 @@ error[E0277]: the trait bound `u32: RHS` is not satisfied | | | required by a bound introduced by this call | - = help: the trait `RHS` is not implemented for `u32` - but trait `RHS` is implemented for it +help: the trait `RHS` is not implemented for `u32` + but trait `RHS` is implemented for it + --> $WORKSPACE/crates/query-builder/src/expr.rs + | + | impl_rhs!(u32, |v: u32| v.to_string()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: for that trait implementation, expected `u32`, found `u8` note: required by a bound in `Col::::eq` --> $WORKSPACE/crates/query-builder/src/table.rs | | pub fn eq>(self, rhs: R) -> BoolExpr { | ^^^^^^^^^ required by this bound in `Col::::eq` + = note: this error originates in the macro `impl_rhs` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0308]: mismatched types --> tests/ui/views.rs:175:62