vector types · phase 7: placement under `unsafe`
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 14
- Forks
- 2
- Avg merge
- 12h 42m
- Merged PRs (30d)
- 61
Description
Phase 7 of docs/discussions/design-vector-types.md: a raw pointer into a device space dereferenced on the host is a placement error inside unsafe.
Type::Pointer has an Option<MemorySpace> slot, and nothing fills it: the parser passes None (src/parser/types.rs:169), no other site in the tree constructs a pointer with Some(..), and the deref check destructures the space away, binding Type::Pointer(t, _, _) (src/hir/check/access.rs:906). So this phase first decides the spelling of a pointer's memory space, then whether the deref check consults it. Report before implementing if the spelling is contentious.
Blocked on Vx#478.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read docs/discussions/design-vector-types.md and first resolve the dependency on Vx#478. Then inspect src/parser/types.rs:169 and src/hir/check/access.rs:906 to understand how pointer memory spaces are currently represented and ignored during dereference checks. Report before implementing if the pointer-space spelling is contentious; done means the representation and unsafe placement check are agreed and implemented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100