diff options
| author | bors <bors@rust-lang.org> | 2024-04-12 16:14:41 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-04-12 16:14:41 +0000 |
| commit | 322e92bdaee73946b8b78d1fb6d9c808ce1436e9 (patch) | |
| tree | 9913cdc400e9a27abfd3a96c1a27ee447123bccf /compiler/rustc_error_codes/src | |
| parent | bd71213cf0a765705e7d72a099151bd4eb465ccb (diff) | |
| parent | 4393eab9eaa5bcd0faa37bea4baf6c14daaff9d7 (diff) | |
| download | rust-322e92bdaee73946b8b78d1fb6d9c808ce1436e9.tar.gz rust-322e92bdaee73946b8b78d1fb6d9c808ce1436e9.zip | |
Auto merge of #123856 - matthiaskrgr:rollup-4v8rkfj, r=matthiaskrgr
Rollup of 8 pull requests Successful merges: - #123204 (rustdoc: point at span in `include_str!`-ed md file) - #123223 (Fix invalid silencing of parsing error) - #123249 (do not add prolog for variadic naked functions) - #123825 (Call the panic hook for non-unwind panics in proc-macros) - #123833 (Update stdarch submodule) - #123841 (Improve diagnostic by suggesting to remove visibility qualifier) - #123849 (Update E0384.md) - #123852 (fix typo in library/std/src/lib.rs) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_error_codes/src')
| -rw-r--r-- | compiler/rustc_error_codes/src/error_codes/E0384.md | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/compiler/rustc_error_codes/src/error_codes/E0384.md b/compiler/rustc_error_codes/src/error_codes/E0384.md index e21fac0797c..6680dbed3dd 100644 --- a/compiler/rustc_error_codes/src/error_codes/E0384.md +++ b/compiler/rustc_error_codes/src/error_codes/E0384.md @@ -18,3 +18,16 @@ fn main() { x = 5; } ``` + +Alternatively, you might consider initializing a new variable: either with a new +bound name or (by [shadowing]) with the bound name of your existing variable. +For example: + +[shadowing]: https://doc.rust-lang.org/book/ch03-01-variables-and-mutability.html#shadowing + +``` +fn main() { + let x = 3; + let x = 5; +} +``` |
