Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Description of slice is misleading

Open
#124 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
45/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Stale
Tech stack
rust
Domain
documentation

Research direction

Open arrays.md at the slices section and compare its wording with the Rust slice documentation and the referenced C++ std::span documentation. Update the description and comparisons so they accurately distinguish Rust slices from arrays and C/C++ arrays, then review the rendered chapter for correctness.

Written by the indexing model from the issue text.

Description

The chapter about slices https://github.com/nrc/r4cppp/blob/master/arrays.md#slices uses wrong comparisons. It states

A slice in Rust is just an array whose length is not known at compile time.

But the rust documentation about slices says https://doc.rust-lang.org/std/slice/

A dynamically-sized view into a contiguous sequence, [T].

So a rust slice is similar to a C++ std:span https://en.cppreference.com/w/cpp/container/span and not similar to a rust array (a value) or to an C/C++ array (only a pointer).

Dominant language
Rust
Stars
3.9k
Forks
297
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from nrc/r4cppp

All issues in nrc/r4cppp

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.