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 pointee_info_at: fix logic for recursing into enums 2024-11-08 07:35:29 +01:00
rustc_arena move strict provenance lints to new feature gate, remove old feature gates 2024-10-21 15:22:17 +01:00
rustc_ast Rollup merge of #132787 - maxcabrajac:fnctxt, r=petrochenkov 2024-11-16 21:05:46 +01:00
rustc_ast_ir Add sugar for &pin (const|mut) types 2024-10-07 11:15:04 -07:00
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 fix clippy::clone_on_ref_ptr for compiler 2024-10-28 18:05:08 +03:00
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 remove support for rustc_safe_intrinsic attribute; use rustc_intrinsic functions instead 2024-11-08 09:16:00 +01:00
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 use tracked_path in rustc_fluent_macro 2024-10-19 22:32:38 +08:00
rustc_fs_util Couple of changes to make it easier to compile rustc for wasm 2024-09-26 19:51:14 +00:00
rustc_graphviz Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
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 compiler: Switch to rustc_abi in hir_pretty, lint_defs, and mir_build 2024-10-30 22:38:49 -07:00
rustc_hir_typeck Rollup merge of #132944 - linyihai:needing-parenthases-issue-132924, r=chenyukang 2024-11-17 22:30:48 -05:00
rustc_incremental replace manual time convertions with std ones 2024-11-03 15:51:39 +03:00
rustc_index Rollup merge of #130625 - heiseish:issue-124028-fix, r=jieyouxu 2024-10-10 12:49:18 +02:00
rustc_index_macros Remove 'apostrophes' from rustc_parse_format 2024-10-14 23:22:51 +02:00
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 Reject raw lifetime followed by \' as well 2024-10-30 01:13:18 +00:00
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 Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
rustc_macros give a better error for tuple structs in derive(Diagnostic) 2024-10-27 21:23:28 -04:00
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 Remove ResultsVisitable. 2024-11-05 10:18:03 +11:00
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 Remove 'apostrophes' from rustc_parse_format 2024-10-14 23:22:51 +02:00
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 compiler: Remove unused rustc_target from Cargo.tomls 2024-11-03 13:38:47 -08:00
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 compiler: Add rustc_abi to _sanitizers 2024-11-02 20:31:47 -07:00
rustc_serialize Fix explicit_iter_loop in rustc_serialize 2024-10-16 15:44:16 +02:00
rustc_session rustc_metadata: Preprocess search paths for better performance 2024-11-15 10:35:33 +01:00
rustc_smir Rollup merge of #132131 - celinval:smir-crate-defs, r=compiler-errors 2024-11-07 18:48:22 -08:00
rustc_span Likely unlikely fix 2024-11-17 21:49:10 +01:00
rustc_symbol_mangling ty::BrK -> ty::BoundRegionKind::K 2024-11-04 04:45:52 +00:00
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 TypingMode 🤔 2024-10-29 17:01:24 +01:00
rustc_transmute Rollup merge of #132255 - workingjubilee:layout-is-🏚️, r=compiler-errors 2024-10-28 10:18:50 -07:00
rustc_ty_utils Make fn_abi_sanity_check a bit stricter 2024-11-07 15:54:40 +00:00
rustc_type_ir Rename the FIXMEs, remove a few that dont matter anymore 2024-11-03 18:59:41 +00:00
rustc_type_ir_macros do not relate Abi and Safety 2024-10-22 23:13:04 +02:00
stable_mir Rollup merge of #132161 - celinval:smir-fix-indent, r=compiler-errors 2024-11-08 18:51:28 +11:00