rust-lang / rust-lang/rust-by-example
3.3 constants, it not clear
Open
Nobody has claimed this yet.
- Dominant language
- Handlebars
- Stars
- 8.1k
- Forks
- 1.6k
- PR merge metrics
- No merged PRs in 30d
Description
In this example,
static LANGUAGE: &str = "Rust";
can change to
const LANGUAGE: &str = "Rust";
There is no difference shows. If so, why not just simplified to always use const
Contributor guide
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
Start with the Rust by Example section 3.3 constants example referenced in the issue and compare the shown static and const declarations. Clarify the distinction and why the example uses static rather than simplifying it to const; done means the example or accompanying explanation makes the difference understandable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100