0
0
mirror of https://github.com/rust-lang/rust.git synced 2024-11-24 18:21:15 +01:00
rust/compiler
Jacob Pratt 6c4a7b6ff3
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.
2024-11-17 22:30:51 -05:00
..
rustc Auto merge of #132282 - Noratrieb:it-is-the-end-of-serial, r=cjgillot 2024-11-12 15:14:56 +00:00
rustc_abi
rustc_arena
rustc_ast Rollup merge of #132787 - maxcabrajac:fnctxt, r=petrochenkov 2024-11-16 21:05:46 +01:00
rustc_ast_ir
rustc_ast_lowering Auto merge of #130443 - veluca93:legacy-const-generics-fix, r=BoxyUwU 2024-11-16 04:57:15 +00:00
rustc_ast_passes Rollup merge of #132787 - maxcabrajac:fnctxt, r=petrochenkov 2024-11-16 21:05:46 +01:00
rustc_ast_pretty
rustc_attr ensure that all publicly reachable const fn have const stability info 2024-11-10 10:16:26 +01:00
rustc_baked_icu_data Delete the cfg(not(parallel)) serial compiler 2024-11-12 13:38:58 +00:00
rustc_borrowck Rollup merge of #133130 - dianne:fix-133118, r=compiler-errors 2024-11-17 22:30:49 -05:00
rustc_builtin_macros Rollup merge of #132787 - maxcabrajac:fnctxt, r=petrochenkov 2024-11-16 21:05:46 +01:00
rustc_codegen_cranelift Likely unlikely fix 2024-11-17 21:49:10 +01:00
rustc_codegen_gcc Likely unlikely fix 2024-11-17 21:49:10 +01:00
rustc_codegen_llvm Likely unlikely fix 2024-11-17 21:49:10 +01:00
rustc_codegen_ssa Likely unlikely fix 2024-11-17 21:49:10 +01:00
rustc_const_eval Auto merge of #120370 - x17jiri:likely_unlikely_fix, r=saethlin 2024-11-17 23:57:53 +00:00
rustc_data_structures Delete the cfg(not(parallel)) serial compiler 2024-11-12 13:38:58 +00:00
rustc_driver
rustc_driver_impl Auto merge of #132282 - Noratrieb:it-is-the-end-of-serial, r=cjgillot 2024-11-12 15:14:56 +00:00
rustc_error_codes
rustc_error_messages Delete the cfg(not(parallel)) serial compiler 2024-11-12 13:38:58 +00:00
rustc_errors Auto merge of #132954 - matthiaskrgr:rollup-x3rww9h, r=matthiaskrgr 2024-11-12 18:04:27 +00:00
rustc_expand Rollup merge of #132787 - maxcabrajac:fnctxt, r=petrochenkov 2024-11-16 21:05:46 +01:00
rustc_feature Add RUSTC_BOOTSTRAP=-1 to make rustc pretend as stable compiler 2024-11-17 19:59:52 +08:00
rustc_fluent_macro
rustc_fs_util
rustc_graphviz
rustc_hir Rollup merge of #132144 - adetaylor:receiver-trait-itself, r=wesleywiser 2024-11-11 21:58:29 +01:00
rustc_hir_analysis Rollup merge of #132795 - compiler-errors:refine-rpitit, r=lcnr 2024-11-17 22:30:47 -05:00
rustc_hir_pretty
rustc_hir_typeck Rollup merge of #132944 - linyihai:needing-parenthases-issue-132924, r=chenyukang 2024-11-17 22:30:48 -05:00
rustc_incremental
rustc_index
rustc_index_macros
rustc_infer Consolidate type system const evaluation under traits::evaluate_const 2024-11-12 02:54:03 +00:00
rustc_interface rustc_metadata: Preprocess search paths for better performance 2024-11-15 10:35:33 +01:00
rustc_lexer
rustc_lint Rollup merge of #132956 - maxcabrajac:coroutine_kind, r=petrochenkov 2024-11-15 23:38:10 +01:00
rustc_lint_defs Mark never_type_fallback_flowing_into_unsafe as a semantic change 2024-11-14 06:01:14 +01:00
rustc_llvm PassWrapper: disable UseOdrIndicator for Asan Win32 2024-11-14 04:20:18 +08:00
rustc_log
rustc_macros
rustc_metadata rustc_metadata: Preprocess search paths for better performance 2024-11-15 10:35:33 +01:00
rustc_middle Auto merge of #132566 - saethlin:querify-mir-collection, r=cjgillot 2024-11-17 06:39:47 +00:00
rustc_mir_build Auto merge of #132943 - matthiaskrgr:rollup-164l3ej, r=matthiaskrgr 2024-11-12 08:15:38 +00:00
rustc_mir_dataflow
rustc_mir_transform Rollup merge of #132134 - nnethercote:rm-ResultsVisitable, r=cjgillot 2024-11-16 21:05:44 +01:00
rustc_monomorphize Rollup merge of #133029 - veluca93:abi-checks-tier3, r=workingjubilee 2024-11-17 23:56:08 +08:00
rustc_next_trait_solver Consolidate type system const evaluation under traits::evaluate_const 2024-11-12 02:54:03 +00:00
rustc_parse Diagnostics for let mut in item context 2024-11-17 22:30:11 +00:00
rustc_parse_format
rustc_passes Rollup merge of #132541 - RalfJung:const-stable-extern-crate, r=compiler-errors 2024-11-12 18:11:04 +01:00
rustc_pattern_analysis
rustc_privacy Simplify some places that deal with generic parameter defaults 2024-11-11 21:29:18 +01:00
rustc_query_impl Delete the cfg(not(parallel)) serial compiler 2024-11-12 13:38:58 +00:00
rustc_query_system Auto merge of #132282 - Noratrieb:it-is-the-end-of-serial, r=cjgillot 2024-11-12 15:14:56 +00:00
rustc_resolve Rollup merge of #132787 - maxcabrajac:fnctxt, r=petrochenkov 2024-11-16 21:05:46 +01:00
rustc_sanitizers
rustc_serialize
rustc_session rustc_metadata: Preprocess search paths for better performance 2024-11-15 10:35:33 +01:00
rustc_smir
rustc_span Likely unlikely fix 2024-11-17 21:49:10 +01:00
rustc_symbol_mangling
rustc_target ABI checks: add support for some tier3 arches, warn on others. 2024-11-14 08:57:39 +01:00
rustc_trait_selection Rollup merge of #132971 - BoxyUwU:handle_infers_in_anon_consts, r=compiler-errors 2024-11-13 22:43:37 -08:00
rustc_traits
rustc_transmute
rustc_ty_utils
rustc_type_ir
rustc_type_ir_macros
stable_mir