Skip to content

Commit cb94ae7

Browse files
committed
UI tests with trybuild
1 parent 41b9048 commit cb94ae7

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

crates/bindings/tests/ui/views.stderr

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,3 +408,29 @@ error[E0277]: the trait bound `NotSpacetimeType: SpacetimeType` is not satisfied
408408
ColId
409409
and $N others
410410
= note: required for `Option<NotSpacetimeType>` to implement `SpacetimeType`
411+
412+
error[E0631]: type mismatch in function arguments
413+
--> tests/ui/views.rs:142:56
414+
|
415+
142 | #[spacetimedb::table(name = scheduled_table, scheduled(scheduled_table_view))]
416+
| -------------------------------------------------------^^^^^^^^^^^^^^^^^^^^---
417+
| | |
418+
| | expected due to this
419+
| required by a bound introduced by this call
420+
...
421+
154 | fn scheduled_table_view(_: &ViewContext, _args: ScheduledTable) -> Vec<Player> {
422+
| ------------------------------------------------------------------------------ found signature defined here
423+
|
424+
= note: expected function signature `for<'a> fn(&'a ReducerContext, ScheduledTable) -> _`
425+
found function signature `fn(&ViewContext, ScheduledTable) -> _`
426+
= note: required for `for<'a> fn(&'a ViewContext, ScheduledTable) -> Vec<Player> {scheduled_table_view}` to implement `Reducer<'_, (ScheduledTable,)>`
427+
= note: required for `for<'a> fn(&'a ViewContext, ScheduledTable) -> Vec<Player> {scheduled_table_view}` to implement `ExportFunctionForScheduledTable<'_, ScheduledTable, {type error}>`
428+
note: required by a bound in `scheduled_typecheck`
429+
--> src/rt.rs
430+
|
431+
| pub const fn scheduled_typecheck<'de, Row, FnKind>(_x: impl ExportFunctionForScheduledTable<'de, Row, FnKind>)
432+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `scheduled_typecheck`
433+
help: consider wrapping the function in a closure
434+
|
435+
142 | #[spacetimedb::table(name = scheduled_table, scheduled(|arg0: &ReducerContext, arg1: ScheduledTable| scheduled_table_view(/* &ViewContext */, arg1)))]
436+
| +++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++

0 commit comments

Comments
 (0)