about summary refs log tree commit diff
path: root/compiler/rustc_ty_utils/src/instance.rs
diff options
context:
space:
mode:
authorJacob Pratt <jacob@jhpratt.dev>2024-11-17 22:30:51 -0500
committerGitHub <noreply@github.com>2024-11-17 22:30:51 -0500
commit6c4a7b6ff3dab45dfb07f8a7c4730255223e87eb (patch)
treeab4ae80e529e6f89472348487a5224e9dfc43dbb /compiler/rustc_ty_utils/src/instance.rs
parent8600e579d58d2d5c23e423782c311f2193723543 (diff)
parent7765f23ea14d16fb0182b475a0ec96891058ae24 (diff)
downloadrust-6c4a7b6ff3dab45dfb07f8a7c4730255223e87eb.tar.gz
rust-6c4a7b6ff3dab45dfb07f8a7c4730255223e87eb.zip
Rollup merge of #133143 - kornelski:let-mut-global, r=compiler-errors
Diagnostics for let mut in item context

The diagnostics for `let` at the top level did not account for `let mut`, which [made the error unclear](https://users.rust-lang.org/t/create-a-vector-of-constants-outside-main/121251/1).

I've made the diagnostic always display a link to valid items. I've added dedicated help for `let mut` case that suggests using a `Mutex` (to steer novice users away from the `static mut` trap). Unfortunately, neither the Rust book, nor libstd docs have dedicated section listing all other types for interior-mutable `static`s.
Diffstat (limited to 'compiler/rustc_ty_utils/src/instance.rs')
0 files changed, 0 insertions, 0 deletions