diff --git a/.github/workflows/on-pull-request.yml b/.github/workflows/on-pull-request.yml index acb63af..49d61a2 100644 --- a/.github/workflows/on-pull-request.yml +++ b/.github/workflows/on-pull-request.yml @@ -39,6 +39,11 @@ jobs: - name: Checkout sources uses: actions/checkout@v3 + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + - name: Install toolchain uses: actions-rs/toolchain@v1 with: diff --git a/tests-e2e/reference_output/test1/test1.d.ts b/tests-e2e/reference_output/test1/test1.d.ts index 7ac75a5..ec8a238 100644 --- a/tests-e2e/reference_output/test1/test1.d.ts +++ b/tests-e2e/reference_output/test1/test1.d.ts @@ -1,8 +1,8 @@ /* tslint:disable */ /* eslint-disable */ /** -* @returns {Point} -*/ + * @returns {Point} + */ export function into_js(): Point; export interface Point { x: number; diff --git a/tests-e2e/reference_output/test2/test2.d.ts b/tests-e2e/reference_output/test2/test2.d.ts index 4c996b0..196cd91 100644 --- a/tests-e2e/reference_output/test2/test2.d.ts +++ b/tests-e2e/reference_output/test2/test2.d.ts @@ -1,8 +1,8 @@ /* tslint:disable */ /* eslint-disable */ /** -* @returns {Point} -*/ + * @returns {Point} + */ export function into_js(): Point; export interface Point { x: number; diff --git a/tests-e2e/reference_output/test4/test4.d.ts b/tests-e2e/reference_output/test4/test4.d.ts index c7675da..eee62c2 100644 --- a/tests-e2e/reference_output/test4/test4.d.ts +++ b/tests-e2e/reference_output/test4/test4.d.ts @@ -1,20 +1,20 @@ /* tslint:disable */ /* eslint-disable */ /** -* @param {Point} point -*/ + * @param {Point} point + */ export function consume(point: Point): void; /** -* @returns {Point} -*/ + * @returns {Point} + */ export function into_js(): Point; /** -* @param {(Point)[]} points -*/ + * @param {(Point)[]} points + */ export function consume_vector(points: (Point)[]): void; /** -* @returns {(Point)[]} -*/ + * @returns {(Point)[]} + */ export function vector_into_js(): (Point)[]; export interface Point { x: number; diff --git a/tests/expand/borrow.expanded.rs b/tests/expand/borrow.expanded.rs index ca1a6a6..7d180c2 100644 --- a/tests/expand/borrow.expanded.rs +++ b/tests/expand/borrow.expanded.rs @@ -58,7 +58,7 @@ const _: () = { Ok(js) => js.into_abi(), Err(err) => { let loc = core::panic::Location::caller(); - let msg = { + let msg = ::alloc::__export::must_use({ let res = ::alloc::fmt::format( format_args!( "(Converting type failed) {0} ({1}:{2}:{3})", err, loc @@ -66,7 +66,7 @@ const _: () = { ), ); res - }; + }); { #[cold] #[track_caller] @@ -105,7 +105,7 @@ const _: () = { Ok(js) => js.into(), Err(err) => { let loc = core::panic::Location::caller(); - let msg = { + let msg = ::alloc::__export::must_use({ let res = ::alloc::fmt::format( format_args!( "(Converting type failed) {0} ({1}:{2}:{3})", err, loc @@ -113,7 +113,7 @@ const _: () = { ), ); res - }; + }); { #[cold] #[track_caller] @@ -145,7 +145,7 @@ const _: () = { Ok(js) => js.into(), Err(err) => { let loc = core::panic::Location::caller(); - let msg = { + let msg = ::alloc::__export::must_use({ let res = ::alloc::fmt::format( format_args!( "(Converting type failed) {0} ({1}:{2}:{3})", err, loc @@ -153,7 +153,7 @@ const _: () = { ), ); res - }; + }); { #[cold] #[track_caller] diff --git a/tests/expand/generic_enum.expanded.rs b/tests/expand/generic_enum.expanded.rs index 7aa7782..ec7e73b 100644 --- a/tests/expand/generic_enum.expanded.rs +++ b/tests/expand/generic_enum.expanded.rs @@ -59,7 +59,7 @@ const _: () = { Ok(js) => js.into_abi(), Err(err) => { let loc = core::panic::Location::caller(); - let msg = { + let msg = ::alloc::__export::must_use({ let res = ::alloc::fmt::format( format_args!( "(Converting type failed) {0} ({1}:{2}:{3})", err, loc @@ -67,7 +67,7 @@ const _: () = { ), ); res - }; + }); { #[cold] #[track_caller] @@ -106,7 +106,7 @@ const _: () = { Ok(js) => js.into(), Err(err) => { let loc = core::panic::Location::caller(); - let msg = { + let msg = ::alloc::__export::must_use({ let res = ::alloc::fmt::format( format_args!( "(Converting type failed) {0} ({1}:{2}:{3})", err, loc @@ -114,7 +114,7 @@ const _: () = { ), ); res - }; + }); { #[cold] #[track_caller] @@ -146,7 +146,7 @@ const _: () = { Ok(js) => js.into(), Err(err) => { let loc = core::panic::Location::caller(); - let msg = { + let msg = ::alloc::__export::must_use({ let res = ::alloc::fmt::format( format_args!( "(Converting type failed) {0} ({1}:{2}:{3})", err, loc @@ -154,7 +154,7 @@ const _: () = { ), ); res - }; + }); { #[cold] #[track_caller] diff --git a/tests/expand/generic_struct.expanded.rs b/tests/expand/generic_struct.expanded.rs index 467628c..1b546b8 100644 --- a/tests/expand/generic_struct.expanded.rs +++ b/tests/expand/generic_struct.expanded.rs @@ -56,7 +56,7 @@ const _: () = { Ok(js) => js.into_abi(), Err(err) => { let loc = core::panic::Location::caller(); - let msg = { + let msg = ::alloc::__export::must_use({ let res = ::alloc::fmt::format( format_args!( "(Converting type failed) {0} ({1}:{2}:{3})", err, loc @@ -64,7 +64,7 @@ const _: () = { ), ); res - }; + }); { #[cold] #[track_caller] @@ -103,7 +103,7 @@ const _: () = { Ok(js) => js.into(), Err(err) => { let loc = core::panic::Location::caller(); - let msg = { + let msg = ::alloc::__export::must_use({ let res = ::alloc::fmt::format( format_args!( "(Converting type failed) {0} ({1}:{2}:{3})", err, loc @@ -111,7 +111,7 @@ const _: () = { ), ); res - }; + }); { #[cold] #[track_caller] @@ -143,7 +143,7 @@ const _: () = { Ok(js) => js.into(), Err(err) => { let loc = core::panic::Location::caller(); - let msg = { + let msg = ::alloc::__export::must_use({ let res = ::alloc::fmt::format( format_args!( "(Converting type failed) {0} ({1}:{2}:{3})", err, loc @@ -151,7 +151,7 @@ const _: () = { ), ); res - }; + }); { #[cold] #[track_caller] @@ -295,7 +295,7 @@ const _: () = { Ok(js) => js.into_abi(), Err(err) => { let loc = core::panic::Location::caller(); - let msg = { + let msg = ::alloc::__export::must_use({ let res = ::alloc::fmt::format( format_args!( "(Converting type failed) {0} ({1}:{2}:{3})", err, loc @@ -303,7 +303,7 @@ const _: () = { ), ); res - }; + }); { #[cold] #[track_caller] @@ -342,7 +342,7 @@ const _: () = { Ok(js) => js.into(), Err(err) => { let loc = core::panic::Location::caller(); - let msg = { + let msg = ::alloc::__export::must_use({ let res = ::alloc::fmt::format( format_args!( "(Converting type failed) {0} ({1}:{2}:{3})", err, loc @@ -350,7 +350,7 @@ const _: () = { ), ); res - }; + }); { #[cold] #[track_caller] @@ -382,7 +382,7 @@ const _: () = { Ok(js) => js.into(), Err(err) => { let loc = core::panic::Location::caller(); - let msg = { + let msg = ::alloc::__export::must_use({ let res = ::alloc::fmt::format( format_args!( "(Converting type failed) {0} ({1}:{2}:{3})", err, loc @@ -390,7 +390,7 @@ const _: () = { ), ); res - }; + }); { #[cold] #[track_caller]