Skip to content

Gate the future doc example on alloc (#193) - #194

Merged
CryZe merged 1 commit into
LiveSplit:masterfrom
ero-qt:issue-193
Oct 11, 2026
Merged

CryZe merged 1 commit into
LiveSplit:masterfrom
ero-qt:issue-193

Conversation

@ero-qt

@ero-qt ero-qt commented Oct 11, 2026

Copy link
Copy Markdown
Contributor

Closes #193.

The run_tasks example in the future module docs now only compiles its hidden use and async fn when alloc is on. Without alloc, the example is empty, so cargo test --no-default-features --features unity passes again.

cargo test --no-default-features --features unity --doc
test src\future\mod.rs - future (line 83) - compile ... ok
test result: ok. 21 passed; 0 failed; 15 ignored

With alloc, the whole example still compiles. I checked by putting a type error in it, which fails with alloc and is skipped without it.

@CryZe CryZe left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reproduced the unresolved run_tasks import on master without alloc. With this change, the Unity doctests pass both without alloc (21 passed) and with alloc (23 passed), and all seven CI checks are green. No public API changes.

Non-blocking follow-up: CI should also run cargo test --no-default-features --features unity so allocation-free doctests are covered.

@CryZe
CryZe merged commit 06f244e into LiveSplit:master Oct 11, 2026
7 checks passed
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.

The future doc example doesn't compile without alloc

2 participants