Two minor wording issues in the Chinese translation of The Book (Ch 3.1 & 3.2)

⚓ Rust    📅 2026-06-20    👤 surdeus    👁️ 2      

surdeus

Hello everyone,

I'm reading the Chinese translation of The Rust Programming Language ( Rust 程序设计语言 - Rust 程序设计语言 简体中文版 ) and came across two small wording issues that I think could be clarified. I wanted to discuss them here before potentially opening a GitHub issue.

Issue 1: Chapter 3.1 - Variables and Mutability

In the section explaining this compile-time error:

let mut spaces = " ";
spaces = spaces.len();

The book says (translated): "This error shows that we cannot change the type of a variable."

I think this is a bit misleading because Rust does allow changing a variable's type through shadowing (let spaces = spaces.len();). The actual error is a type mismatch — you're trying to assign a usize value to a &str variable.

Wouldn't it be more accurate to say something like: "This error shows that we cannot assign a usize value to a variable of type &str, because their types don't match."?

Issue 2: Chapter 3.2 - Scalar Types (Integer Types)

In the introduction to signed/unsigned integers, the book says (translated): "whether it is always positive, and therefore does not need a sign (unsigned)".

Mathematically, zero is neither positive nor negative. Unsigned integers represent non-negative numbers (zero and positive), not just "positive" numbers. I think this should be corrected to "whether it is always non-negative (zero or positive)" to be mathematically precise.

2 posts - 2 participants

Read full topic

🏷️ Rust_feed