rust-lang / rust-lang/rust-by-example

3.3 constants, it not clear

Open
#1,655 2 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

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.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.