Skip to content

Commit 9cb9563

Browse files
Fix CI errors (#47)
* chore: update expand snapshot by running `MACROTEST=overwrite cargo test` * chore: add Node.js setup step in pull request workflow * fix: correct formatting of JSDoc comments in type definitions
1 parent 694798e commit 9cb9563

File tree

7 files changed

+41
-36
lines changed

7 files changed

+41
-36
lines changed

.github/workflows/on-pull-request.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ jobs:
3939
- name: Checkout sources
4040
uses: actions/checkout@v3
4141

42+
- name: Setup Node.js
43+
uses: actions/setup-node@v4
44+
with:
45+
node-version: '20'
46+
4247
- name: Install toolchain
4348
uses: actions-rs/toolchain@v1
4449
with:

tests-e2e/reference_output/test1/test1.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/* tslint:disable */
22
/* eslint-disable */
33
/**
4-
* @returns {Point}
5-
*/
4+
* @returns {Point}
5+
*/
66
export function into_js(): Point;
77
export interface Point {
88
x: number;

tests-e2e/reference_output/test2/test2.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/* tslint:disable */
22
/* eslint-disable */
33
/**
4-
* @returns {Point}
5-
*/
4+
* @returns {Point}
5+
*/
66
export function into_js(): Point;
77
export interface Point {
88
x: number;

tests-e2e/reference_output/test4/test4.d.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
/* tslint:disable */
22
/* eslint-disable */
33
/**
4-
* @param {Point} point
5-
*/
4+
* @param {Point} point
5+
*/
66
export function consume(point: Point): void;
77
/**
8-
* @returns {Point}
9-
*/
8+
* @returns {Point}
9+
*/
1010
export function into_js(): Point;
1111
/**
12-
* @param {(Point)[]} points
13-
*/
12+
* @param {(Point)[]} points
13+
*/
1414
export function consume_vector(points: (Point)[]): void;
1515
/**
16-
* @returns {(Point)[]}
17-
*/
16+
* @returns {(Point)[]}
17+
*/
1818
export function vector_into_js(): (Point)[];
1919
export interface Point {
2020
x: number;

tests/expand/borrow.expanded.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,15 @@ const _: () = {
5858
Ok(js) => js.into_abi(),
5959
Err(err) => {
6060
let loc = core::panic::Location::caller();
61-
let msg = {
61+
let msg = ::alloc::__export::must_use({
6262
let res = ::alloc::fmt::format(
6363
format_args!(
6464
"(Converting type failed) {0} ({1}:{2}:{3})", err, loc
6565
.file(), loc.line(), loc.column(),
6666
),
6767
);
6868
res
69-
};
69+
});
7070
{
7171
#[cold]
7272
#[track_caller]
@@ -105,15 +105,15 @@ const _: () = {
105105
Ok(js) => js.into(),
106106
Err(err) => {
107107
let loc = core::panic::Location::caller();
108-
let msg = {
108+
let msg = ::alloc::__export::must_use({
109109
let res = ::alloc::fmt::format(
110110
format_args!(
111111
"(Converting type failed) {0} ({1}:{2}:{3})", err, loc
112112
.file(), loc.line(), loc.column(),
113113
),
114114
);
115115
res
116-
};
116+
});
117117
{
118118
#[cold]
119119
#[track_caller]
@@ -145,15 +145,15 @@ const _: () = {
145145
Ok(js) => js.into(),
146146
Err(err) => {
147147
let loc = core::panic::Location::caller();
148-
let msg = {
148+
let msg = ::alloc::__export::must_use({
149149
let res = ::alloc::fmt::format(
150150
format_args!(
151151
"(Converting type failed) {0} ({1}:{2}:{3})", err, loc
152152
.file(), loc.line(), loc.column(),
153153
),
154154
);
155155
res
156-
};
156+
});
157157
{
158158
#[cold]
159159
#[track_caller]

tests/expand/generic_enum.expanded.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,15 @@ const _: () = {
5959
Ok(js) => js.into_abi(),
6060
Err(err) => {
6161
let loc = core::panic::Location::caller();
62-
let msg = {
62+
let msg = ::alloc::__export::must_use({
6363
let res = ::alloc::fmt::format(
6464
format_args!(
6565
"(Converting type failed) {0} ({1}:{2}:{3})", err, loc
6666
.file(), loc.line(), loc.column(),
6767
),
6868
);
6969
res
70-
};
70+
});
7171
{
7272
#[cold]
7373
#[track_caller]
@@ -106,15 +106,15 @@ const _: () = {
106106
Ok(js) => js.into(),
107107
Err(err) => {
108108
let loc = core::panic::Location::caller();
109-
let msg = {
109+
let msg = ::alloc::__export::must_use({
110110
let res = ::alloc::fmt::format(
111111
format_args!(
112112
"(Converting type failed) {0} ({1}:{2}:{3})", err, loc
113113
.file(), loc.line(), loc.column(),
114114
),
115115
);
116116
res
117-
};
117+
});
118118
{
119119
#[cold]
120120
#[track_caller]
@@ -146,15 +146,15 @@ const _: () = {
146146
Ok(js) => js.into(),
147147
Err(err) => {
148148
let loc = core::panic::Location::caller();
149-
let msg = {
149+
let msg = ::alloc::__export::must_use({
150150
let res = ::alloc::fmt::format(
151151
format_args!(
152152
"(Converting type failed) {0} ({1}:{2}:{3})", err, loc
153153
.file(), loc.line(), loc.column(),
154154
),
155155
);
156156
res
157-
};
157+
});
158158
{
159159
#[cold]
160160
#[track_caller]

tests/expand/generic_struct.expanded.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,15 @@ const _: () = {
5656
Ok(js) => js.into_abi(),
5757
Err(err) => {
5858
let loc = core::panic::Location::caller();
59-
let msg = {
59+
let msg = ::alloc::__export::must_use({
6060
let res = ::alloc::fmt::format(
6161
format_args!(
6262
"(Converting type failed) {0} ({1}:{2}:{3})", err, loc
6363
.file(), loc.line(), loc.column(),
6464
),
6565
);
6666
res
67-
};
67+
});
6868
{
6969
#[cold]
7070
#[track_caller]
@@ -103,15 +103,15 @@ const _: () = {
103103
Ok(js) => js.into(),
104104
Err(err) => {
105105
let loc = core::panic::Location::caller();
106-
let msg = {
106+
let msg = ::alloc::__export::must_use({
107107
let res = ::alloc::fmt::format(
108108
format_args!(
109109
"(Converting type failed) {0} ({1}:{2}:{3})", err, loc
110110
.file(), loc.line(), loc.column(),
111111
),
112112
);
113113
res
114-
};
114+
});
115115
{
116116
#[cold]
117117
#[track_caller]
@@ -143,15 +143,15 @@ const _: () = {
143143
Ok(js) => js.into(),
144144
Err(err) => {
145145
let loc = core::panic::Location::caller();
146-
let msg = {
146+
let msg = ::alloc::__export::must_use({
147147
let res = ::alloc::fmt::format(
148148
format_args!(
149149
"(Converting type failed) {0} ({1}:{2}:{3})", err, loc
150150
.file(), loc.line(), loc.column(),
151151
),
152152
);
153153
res
154-
};
154+
});
155155
{
156156
#[cold]
157157
#[track_caller]
@@ -295,15 +295,15 @@ const _: () = {
295295
Ok(js) => js.into_abi(),
296296
Err(err) => {
297297
let loc = core::panic::Location::caller();
298-
let msg = {
298+
let msg = ::alloc::__export::must_use({
299299
let res = ::alloc::fmt::format(
300300
format_args!(
301301
"(Converting type failed) {0} ({1}:{2}:{3})", err, loc
302302
.file(), loc.line(), loc.column(),
303303
),
304304
);
305305
res
306-
};
306+
});
307307
{
308308
#[cold]
309309
#[track_caller]
@@ -342,15 +342,15 @@ const _: () = {
342342
Ok(js) => js.into(),
343343
Err(err) => {
344344
let loc = core::panic::Location::caller();
345-
let msg = {
345+
let msg = ::alloc::__export::must_use({
346346
let res = ::alloc::fmt::format(
347347
format_args!(
348348
"(Converting type failed) {0} ({1}:{2}:{3})", err, loc
349349
.file(), loc.line(), loc.column(),
350350
),
351351
);
352352
res
353-
};
353+
});
354354
{
355355
#[cold]
356356
#[track_caller]
@@ -382,15 +382,15 @@ const _: () = {
382382
Ok(js) => js.into(),
383383
Err(err) => {
384384
let loc = core::panic::Location::caller();
385-
let msg = {
385+
let msg = ::alloc::__export::must_use({
386386
let res = ::alloc::fmt::format(
387387
format_args!(
388388
"(Converting type failed) {0} ({1}:{2}:{3})", err, loc
389389
.file(), loc.line(), loc.column(),
390390
),
391391
);
392392
res
393-
};
393+
});
394394
{
395395
#[cold]
396396
#[track_caller]

0 commit comments

Comments
 (0)