Skip to content

transpile: Use raw borrows in assembly translations#1716

Open
Rua wants to merge 2 commits intoimmunant:kkysen/transpile-snapshots-expect_unresolved_importfrom
Rua:asm
Open

transpile: Use raw borrows in assembly translations#1716
Rua wants to merge 2 commits intoimmunant:kkysen/transpile-snapshots-expect_unresolved_importfrom
Rua:asm

Conversation

@Rua
Copy link
Copy Markdown
Contributor

@Rua Rua commented Apr 1, 2026

Since this depends on the changes made to asm-casts in #1712, I don't know if this will work as-is or if other changes are needed. It doesn't seem like the asm-casts crate is available for snapshot tests in any case?

@Rua Rua force-pushed the asm branch 3 times, most recently from e9c40a8 to 4bb0ddf Compare April 1, 2026 12:39
Copy link
Copy Markdown
Contributor

@kkysen kkysen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this depends on the changes made to asm-casts in #1712, I don't know if this will work as-is or if other changes are needed. It doesn't seem like the asm-casts crate is available for snapshot tests in any case?

No, not yet. The snapshot tests run rustc directly, not cargo, so resolving other dependencies is annoyingly difficult. We skip running rustc on tests containing libc, for example.

@Rua
Copy link
Copy Markdown
Contributor Author

Rua commented Apr 1, 2026

It doesn't seem to have any trouble with tests that require f128 though?

@kkysen
Copy link
Copy Markdown
Contributor

kkysen commented Apr 1, 2026

It doesn't seem to have any trouble with tests that require f128 though?

Hmm, that's weird. Are those tests using libc, too? If so, they were just skipping running rustc.

@Rua
Copy link
Copy Markdown
Contributor Author

Rua commented Apr 1, 2026

I guess for now, I can mark these as "expect compile error"?

EDIT: I've now done so, but it's a rather bad hack/workaround...

@kkysen
Copy link
Copy Markdown
Contributor

kkysen commented Apr 1, 2026

I guess for now, I can mark these as "expect compile error"?

EDIT: I've now done so, but it's a rather bad hack/workaround...

See #1716. It's still a workaround, as switching to cargo instead of rustc is more work, but it should be much more precise.

Copy link
Copy Markdown
Contributor

@kkysen kkysen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Rua, can you rebase this on #1719? See if that works better as a partial solution.

@kkysen kkysen changed the base branch from master to kkysen/transpile-snapshots-expect_unresolved_import April 3, 2026 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Generated Rust for inline assembly violates borrow-checking rules ASM wrappers produce code that violates borrow rules

2 participants