bevyengine / bevyengine/bevy

`contiguous_iter` should be a compile error if not using table storage strategy

Open
#24,374 1 comment 1 reaction 0 assignees View on GitHub
A-ECS C-Usability D-Straightforward S-Ready-For-Implementation
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 16h
Merged PRs (30d)
171

Description

## What problem does this solve or what need does it fill?

Using the wrong storage and attempting to use these methods results in a runtime error, which is suboptimal.

## What solution would you like?

We can improve the API by making these iteration methods not return a result and instead gate the trait implementation on the GAT.

## What alternative(s) have you considered?

N/A

## Additional context

This is a new feature in 0.19, so if this is fixed in the RC, that would be cool.

Contributor guide

Open the contributing guide

Research direction

Start by locating the contiguous_iter methods and the trait implementation gated by the storage-strategy GAT. Compare the table and non-table storage paths, then verify that invalid uses fail at compile time while valid table iteration remains available.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.