An idea for adding functionality to Rust regarding shadowing

2026-11-03来源 Rust Users ForumEnglish

Instead, I suggest:
let x=3;
let x=4;
let mut x=5;

Do this:
let x=3;
hat x=4;
hat mut x=5;

Since Rust specializes in catching human oversights, and shadowing is somewhat akin to pointers, I believe that shadowing should also be caught at the syntactic level.

3 posts - 3 participants

Read full topic

原文:https://www.a8q9.cn/en/article/an-idea-for-adding-functionality-to-rust-regarding-shadowing-c7f127.html

相关文章