35 Move code blocks are labelled rust - #27925
Draft
jessiemongeon1 wants to merge 1 commit into
Draft
Conversation
Move examples across 6 pages sit in ```rust fences, so they render with Rust highlighting. The clearest case is custom-indexer/bring-your-own-store.mdx, where the first line inside the rust fence is the comment "// Move smart contract". references/ts-asset-tokenization.mdx carries 23 of them, kiosk.mdx 6, simulating-refs.mdx 3, and 1 each on groth16.mdx, bring-your-own-store.mdx, and suins/developer.mdx. Relabelling exposed 11 struct declarations that the earlier public struct sweep could not see, because that sweep only looked inside ```move fences. Applied the same 2024 rule to them here. ts-asset-tokenization.mdx also declared transfer_policy as public(friend), the visibility the Move book heads as deprecated. Changed to public(package). sui-stack/seal/using-seal.mdx has the same problem and is excluded. That directory is gitignored and generated from MystenLabs/seal, so the fix belongs upstream. One block needed a second pass. My first detector treated `let mut` as a Rust marker and skipped suins/developer.mdx, but `let mut` is Move 2024 syntax, documented in the Move book's variables chapter.
jessiemongeon1
deployed
to
sui-typescript-aws-kms-test-env
September 8, 2026 23:25 — with
GitHub Actions
Active
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Found while sweeping the sections this audit had not yet reached.
35 Move examples across 6 pages sit in
```rustfences, so they render with Rust syntax highlighting. The clearest case iscustom-indexer/bring-your-own-store.mdx, where the first line inside therustfence is:references/ts-asset-tokenization.mdxonchain-finance/examples-patterns/kiosk.mdxdevelop/objects/transfers/simulating-refs.mdxdevelop/cryptography/groth16.mdxdevelop/accessing-data/custom-indexer/bring-your-own-store.mdxsui-stack/suins/developer.mdxRelabelling exposed 11 more stale structs
The
public structsweep in #27922 only looked inside```movefences, so it could not see these. Applying the same Move 2024 rule to the newly relabelled blocks fixed 11 more. No file overlap with #27922, so the two merge independently.ts-asset-tokenization.mdxalso declaredtransfer_policyaspublic(friend), the visibility the Move book heads as DEPRECATED. Changed topublic(package), matching the fix in #27910.Excluded
sui-stack/seal/using-seal.mdxhas the same problem. That directory is gitignored and generated fromMystenLabs/seal, so editing it here would be overwritten. The fix belongs upstream in the Seal repository.A detector bug worth recording
My first pass skipped
suins/developer.mdxbecause it treatslet mutas a Rust marker.let mutis Move 2024 syntax, documented in the Move book's variables chapter. Anyone writing a similar heuristic should not use it to tell the two apart.Test plan
public fun,has key,&mut TxContext,module a::b {) and no Rust markers (fn,impl,pub fn).rustfences outside generated content.