Skip to content

Commit ccf8be0

Browse files
committed
bless ui tests more
1 parent e902185 commit ccf8be0

3 files changed

Lines changed: 44 additions & 43 deletions

File tree

crates/bindings/tests/ui/reducers.stderr

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ error: scheduled table missing required columns; add these to your struct:
1717
scheduled_at: spacetimedb::ScheduleAt,
1818
--> tests/ui/reducers.rs:28:63
1919
|
20-
28 | #[spacetimedb::table(accessor = scheduled_table_missing_rows, scheduled(sched...
21-
| ^^^^^^^^^
20+
28 | ...eduled_table_missing_rows, scheduled(scheduled_table_missing_row...
21+
| ^^^^^^^^^
2222

2323
error[E0277]: invalid reducer signature
2424
--> tests/ui/reducers.rs:6:4
@@ -37,8 +37,8 @@ error[E0277]: invalid reducer signature
3737
note: required by a bound in `register_reducer`
3838
--> src/rt.rs
3939
|
40-
| ...: impl Reducer<'a, A>) {
41-
| ^^^^^^^^^^^^^^ required by this bound in `register_reducer`
40+
| ...educerFn>>(_: impl Reducer<'a, A>) {
41+
| ^^^^^^^^^^^^^^ required by this bound in `register_reducer`
4242

4343
error[E0277]: the reducer argument `Test` does not implement `SpacetimeType`
4444
--> tests/ui/reducers.rs:6:40
@@ -103,8 +103,8 @@ error[E0277]: invalid reducer signature
103103
note: required by a bound in `register_reducer`
104104
--> src/rt.rs
105105
|
106-
| ...: impl Reducer<'a, A>) {
107-
| ^^^^^^^^^^^^^^ required by this bound in `register_reducer`
106+
| ...educerFn>>(_: impl Reducer<'a, A>) {
107+
| ^^^^^^^^^^^^^^ required by this bound in `register_reducer`
108108

109109
error[E0277]: `Test` is not a valid reducer return type
110110
--> tests/ui/reducers.rs:9:46
@@ -166,8 +166,8 @@ error[E0277]: invalid reducer signature
166166
note: required by a bound in `register_reducer`
167167
--> src/rt.rs
168168
|
169-
| ...: impl Reducer<'a, A>) {
170-
| ^^^^^^^^^^^^^^ required by this bound in `register_reducer`
169+
| ...educerFn>>(_: impl Reducer<'a, A>) {
170+
| ^^^^^^^^^^^^^^ required by this bound in `register_reducer`
171171

172172
error[E0277]: the first argument of a reducer must be `&ReducerContext`
173173
--> tests/ui/reducers.rs:23:20
@@ -221,8 +221,8 @@ error[E0277]: invalid reducer signature
221221
note: required by a bound in `register_reducer`
222222
--> src/rt.rs
223223
|
224-
| ...: impl Reducer<'a, A>) {
225-
| ^^^^^^^^^^^^^^ required by this bound in `register_reducer`
224+
| ...educerFn>>(_: impl Reducer<'a, A>) {
225+
| ^^^^^^^^^^^^^^ required by this bound in `register_reducer`
226226

227227
error[E0277]: the first argument of a reducer must be `&ReducerContext`
228228
--> tests/ui/reducers.rs:26:21
@@ -276,5 +276,5 @@ error[E0593]: function is expected to take 2 arguments, but it takes 3 arguments
276276
note: required by a bound in `scheduled_typecheck`
277277
--> src/rt.rs
278278
|
279-
| ..._x: impl ExportFunctionForScheduledTable<'de, Row, FnKind>)
280-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `scheduled_typecheck`
279+
| ...impl ExportFunctionForScheduledTable<'de, Row, FnKind>)
280+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `scheduled_typecheck`

crates/bindings/tests/ui/tables.stderr

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ help: the trait `Deserialize<'de>` is not implemented for `Test`
6060
note: required by a bound in `spacetimedb::spacetimedb_lib::de::SeqProductAccess::next_element`
6161
--> $WORKSPACE/crates/sats/src/de.rs
6262
|
63-
| fn next_element<T: Deserialize<'de>>(&mut self) -> Result<Option<T>, Sel...
64-
| ^^^^^^^^^^^^^^^^ required by this bound in `SeqProductAccess::next_element`
63+
| ...fn next_element<T: Deserialize<'de>>(&mut self) -> Result<Optio...
64+
| ^^^^^^^^^^^^^^^^ required by this bound in `SeqProductAccess::next_element`
6565

6666
error[E0277]: the trait bound `Test: Deserialize<'de>` is not satisfied
6767
--> tests/ui/tables.rs:5:8
@@ -90,8 +90,8 @@ help: the trait `Deserialize<'de>` is not implemented for `Test`
9090
note: required by a bound in `spacetimedb::spacetimedb_lib::de::SeqProductAccess::validate_next_element`
9191
--> $WORKSPACE/crates/sats/src/de.rs
9292
|
93-
| ...lidate_next_element<T: Deserialize<'de>>(&mut self) -> Result<Option<()>,...
94-
| ^^^^^^^^^^^^^^^^ required by this bound in `SeqProductAccess::validate_next_element`
93+
| ...te_next_element<T: Deserialize<'de>>(&mut self) -> Result<Optio...
94+
| ^^^^^^^^^^^^^^^^ required by this bound in `SeqProductAccess::validate_next_element`
9595

9696
error[E0277]: the trait bound `Test: Deserialize<'_>` is not satisfied
9797
--> tests/ui/tables.rs:5:8
@@ -117,8 +117,8 @@ help: the trait `Deserialize<'_>` is not implemented for `Test`
117117
note: required by a bound in `get_field_value`
118118
--> $WORKSPACE/crates/sats/src/de.rs
119119
|
120-
| fn get_field_value<T: Deserialize<'de>>(&mut self) -> Result<T, Self::Er...
121-
| ^^^^^^^^^^^^^^^^ required by this bound in `NamedProductAccess::get_field_value`
120+
| ...get_field_value<T: Deserialize<'de>>(&mut self) -> Result<T, Se...
121+
| ^^^^^^^^^^^^^^^^ required by this bound in `NamedProductAccess::get_field_value`
122122

123123
error[E0277]: the trait bound `Test: Deserialize<'_>` is not satisfied
124124
--> tests/ui/tables.rs:5:8
@@ -144,8 +144,8 @@ help: the trait `Deserialize<'_>` is not implemented for `Test`
144144
note: required by a bound in `validate_field_value`
145145
--> $WORKSPACE/crates/sats/src/de.rs
146146
|
147-
| ...alidate_field_value<T: Deserialize<'de>>(&mut self) -> Result<(), Self::E...
148-
| ^^^^^^^^^^^^^^^^ required by this bound in `NamedProductAccess::validate_field_value`
147+
| ...ate_field_value<T: Deserialize<'de>>(&mut self) -> Result<(), S...
148+
| ^^^^^^^^^^^^^^^^ required by this bound in `NamedProductAccess::validate_field_value`
149149

150150
error[E0277]: the trait bound `Test: Serialize` is not satisfied
151151
--> tests/ui/tables.rs:5:8
@@ -171,8 +171,8 @@ help: the trait `Serialize` is not implemented for `Test`
171171
note: required by a bound in `spacetimedb::spacetimedb_lib::ser::SerializeNamedProduct::serialize_element`
172172
--> $WORKSPACE/crates/sats/src/ser.rs
173173
|
174-
| fn serialize_element<T: Serialize + ?Sized>(&mut self, name: Option<&str...
175-
| ^^^^^^^^^ required by this bound in `SerializeNamedProduct::serialize_element`
174+
| ...serialize_element<T: Serialize + ?Sized>(&mut self, name: Optio...
175+
| ^^^^^^^^^ required by this bound in `SerializeNamedProduct::serialize_element`
176176

177177
error[E0277]: the column type `Test` does not implement `SpacetimeType`
178178
--> tests/ui/tables.rs:5:8
@@ -220,7 +220,7 @@ error[E0277]: `&'a Alpha` cannot appear as an argument to an index filtering ope
220220
note: required by a bound in `UniqueColumn::<Tbl, <Col as spacetimedb::table::Column>::ColType, Col>::find`
221221
--> src/table.rs
222222
|
223-
| pub fn find(&self, col_val: impl Borrow<Col::ColType>) -> Option<Tbl::Row>
223+
| pub fn find(&self, col_val: impl Borrow<Col::ColType>) -> Opti...
224224
| ---- required by a bound in this associated function
225225
| where
226226
| for<'a> &'a Col::ColType: FilterableValue,
@@ -253,7 +253,7 @@ help: the trait `FilterableValue` is not implemented for `Alpha`
253253
note: required by a bound in `RangedIndex::<Tbl, IndexType, Idx>::filter`
254254
--> src/table.rs
255255
|
256-
| pub fn filter<B, K>(&self, b: B) -> impl Iterator<Item = Tbl::Row> + use<B, K, Tbl, IndexType, Idx>
256+
| pub fn filter<B, K>(&self, b: B) -> impl Iterator<Item = Tbl::...
257257
| ------ required by a bound in this associated function
258258
| where
259259
| B: IndexScanRangeBounds<IndexType, K>,

crates/bindings/tests/ui/views.stderr

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ error: `public` already specified
1515
error: expected string literal
1616
--> tests/ui/views.rs:88:45
1717
|
18-
88 | #[view(accessor = view_def_dup_name, name = view_def_dup_name, public)]
18+
88 | #[view(accessor = view_def_dup_name, name = view_def_dup_name, publ...
1919
| ^^^^^^^^^^^^^^^^^
2020

2121
error: expected one of: `name`, `public`, `accessor`
@@ -57,8 +57,8 @@ error: Views do not take parameters other than `&ViewContext` or `&AnonymousView
5757
error[E0425]: cannot find type `ScheduledTable` in this scope
5858
--> tests/ui/views.rs:143:45
5959
|
60-
143 | ...wContext, _args: ScheduledTable) -> Vec<PlayerInfo> {
61-
| ^^^^^^^^^^^^^^ not found in this scope
60+
143 | ...ext, _args: ScheduledTable) -> Vec<PlayerInfo> {
61+
| ^^^^^^^^^^^^^^ not found in this scope
6262

6363
error[E0425]: cannot find type `T` in this scope
6464
--> tests/ui/views.rs:202:60
@@ -288,7 +288,7 @@ error[E0277]: invalid view signature
288288
note: required by a bound in `ViewDispatcher::<ViewContext>::invoke`
289289
--> src/rt.rs
290290
|
291-
| pub fn invoke<'a, A, T, V>(view: V, ctx: ViewContext, args: &'a [u8]) ->...
291+
| pub fn invoke<'a, A, T, V>(view: V, ctx: ViewContext, args: &'...
292292
| ------ required by a bound in this associated function
293293
...
294294
| V: View<'a, A, T>,
@@ -320,8 +320,8 @@ note: required by a bound in `ViewRegistrar::<AnonymousViewContext>::register`
320320
error[E0277]: the trait bound `NotSpacetimeType: SpacetimeType` is not satisfied
321321
--> tests/ui/views.rs:137:71
322322
|
323-
137 | ...Context) -> Option<NotSpacetimeType> {
324-
| ^^^^^^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound
323+
137 | ...xt) -> Option<NotSpacetimeType> {
324+
| ^^^^^^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound
325325
|
326326
help: the trait `SpacetimeType` is not implemented for `NotSpacetimeType`
327327
--> tests/ui/views.rs:73:1
@@ -344,8 +344,8 @@ help: the trait `SpacetimeType` is not implemented for `NotSpacetimeType`
344344
error[E0277]: the trait bound `NotSpacetimeType: Serialize` is not satisfied
345345
--> tests/ui/views.rs:137:71
346346
|
347-
137 | ...Context) -> Option<NotSpacetimeType> {
348-
| ^^^^^^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound
347+
137 | ...xt) -> Option<NotSpacetimeType> {
348+
| ^^^^^^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound
349349
|
350350
help: the trait `Serialize` is not implemented for `NotSpacetimeType`
351351
--> tests/ui/views.rs:73:1
@@ -379,7 +379,7 @@ error[E0277]: invalid anonymous view signature
379379
note: required by a bound in `ViewDispatcher::<AnonymousViewContext>::invoke`
380380
--> src/rt.rs
381381
|
382-
| pub fn invoke<'a, A, T, V>(view: V, ctx: AnonymousViewContext, args: &'a...
382+
| pub fn invoke<'a, A, T, V>(view: V, ctx: AnonymousViewContext,...
383383
| ------ required by a bound in this associated function
384384
...
385385
| V: AnonymousView<'a, A, T>,
@@ -389,8 +389,8 @@ note: required by a bound in `ViewDispatcher::<AnonymousViewContext>::invoke`
389389
error[E0277]: the trait bound `NotSpacetimeType: SpacetimeType` is not satisfied
390390
--> tests/ui/views.rs:137:71
391391
|
392-
137 | ...Context) -> Option<NotSpacetimeType> {
393-
| ^^^^^^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound
392+
137 | ...xt) -> Option<NotSpacetimeType> {
393+
| ^^^^^^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound
394394
|
395395
help: the trait `SpacetimeType` is not implemented for `NotSpacetimeType`
396396
--> tests/ui/views.rs:73:1
@@ -414,10 +414,11 @@ error[E0277]: the trait bound `{integer}: RHS<Player, spacetimedb::Identity>` is
414414
--> tests/ui/views.rs:160:49
415415
|
416416
160 | ctx.from.player().r#where(|a| a.identity.eq(42)).build()
417-
| -- ^^ the trait `RHS<Player, spacetimedb::Identity>` is not implemented for `{integer}`
417+
| -- ^^ unsatisfied trait bound
418418
| |
419419
| required by a bound introduced by this call
420420
|
421+
= help: the trait `RHS<Player, spacetimedb::Identity>` is not implemented for `{integer}`
421422
= help: the following other types implement trait `RHS<T, V>`:
422423
`f32` implements `RHS<T, f32>`
423424
`f64` implements `RHS<T, f64>`
@@ -459,24 +460,24 @@ note: required by a bound in `Col::<T, V>::eq`
459460
error[E0308]: mismatched types
460461
--> tests/ui/views.rs:175:62
461462
|
462-
175 | .left_semijoin(ctx.from.player(), |a, b| a.weight.eq(b.identity))
463-
| -- ^^^^^^^^^^ expected `IxCol<Player, u32>`, found `IxCol<Player, Identity>`
464-
| |
465-
| arguments to this method are incorrect
463+
175 | ...), |a, b| a.weight.eq(b.identity))
464+
| -- ^^^^^^^^^^ expected `IxCol<Player, u32>`, found `IxCol<Player, Identity>`
465+
| |
466+
| arguments to this method are incorrect
466467
|
467468
= note: expected struct `IxCol<Player, u32>`
468469
found struct `IxCol<Player, spacetimedb::Identity>`
469470
note: method defined here
470471
--> $WORKSPACE/crates/query-builder/src/join.rs
471472
|
472-
| pub fn eq<R: HasIxCols>(self, rhs: IxCol<R, V>) -> IxJoinEq<T, R, V> {
473+
| pub fn eq<R: HasIxCols>(self, rhs: IxCol<R, V>) -> IxJoinEq<T,...
473474
| ^^
474475

475476
error[E0609]: no field `age` on type `&PlayerInfoIxCols`
476477
--> tests/ui/views.rs:185:72
477478
|
478-
185 | .right_semijoin(ctx.from.player_info(), |a, b| a.identity.eq(b.age))
479-
| ^^^ unknown field
479+
185 | ...|a, b| a.identity.eq(b.age))
480+
| ^^^ unknown field
480481
|
481482
= note: available fields are: `identity`, `weight`
482483

0 commit comments

Comments
 (0)