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

Shadowing vs Freezing

Open
#1,834 2 comments 1 reaction 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

This example on Freezing should possibly be updated and moved to section 4.2 that talks of shadowing.
https://doc.rust-lang.org/stable/rust-by-example/variable_bindings/freeze.html

There is no "data freezing" going on based on the mutability state of the variables.

however as explained here https://github.com/rust-lang/rust-by-example/issues/1516 its variable shadowing.

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

Read the Freezing example at the linked Rust by Example page, then compare it with section 4.2 on shadowing and the discussion in issue #1516. Update the example's terminology and placement so it accurately describes variable shadowing, and verify the surrounding documentation remains coherent.

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.