rust/compiler
Stuart Cook 58b44fc0f0
Rollup merge of #148779 - zachs18:panic-location-dynsendsync, r=nnethercote
Implement DynSend and DynSync for std::panic::Location.

Allows the compiler to build with the `debug_refcell` stdlib cargo feature.

With `rust.std-features = ["debug_refcell"]` in bootstrap.toml, `./x.py build --stage 2` fails before this patch, and succeeds afterwards.

<details> <summary>error for `./x.py build --stage 2` before this patch</summary>

```Rust
error[E0277]: `NonNull<str>` doesn't implement `DynSync`. Add it to `rustc_data_structures::marker` or use `IntoDynSyncSend` if it's already `Sync`
    --> compiler/rustc_query_system/src/dep_graph/serialized.rs:719:33
     |
 719 |           let results = broadcast(|_| {
     |  _______________________---------_^
     | |                       |
     | |                       required by a bound introduced by this call
 720 | |             let mut local = self.local.borrow_mut();
...    |
 734 | |         });
     | |_________^ within `Location<'static>`, the trait `DynSync` is not implemented for `NonNull<str>`
     |
note: required because it appears within the type `Location<'static>`
    --> /home/zachary/opt_mount/zachary/Programming/rust-compiler-2/library/core/src/panic/location.rs:39:12
     |
  39 | pub struct Location<'a> {
     |            ^^^^^^^^
     = note: required for `&'static Location<'static>` to implement `DynSend`
note: required because it appears within the type `std::option::Option<&'static Location<'static>>`
    --> /home/zachary/opt_mount/zachary/Programming/rust-compiler-2/library/core/src/option.rs:599:10
     |
 599 | pub enum Option<T> {
     |          ^^^^^^
note: required because it appears within the type `std::cell::UnsafeCell<std::option::Option<&'static Location<'static>>>`
    --> /home/zachary/opt_mount/zachary/Programming/rust-compiler-2/library/core/src/cell.rs:2289:12
     |
2289 | pub struct UnsafeCell<T: ?Sized> {
     |            ^^^^^^^^^^
note: required because it appears within the type `Cell<std::option::Option<&'static Location<'static>>>`
    --> /home/zachary/opt_mount/zachary/Programming/rust-compiler-2/library/core/src/cell.rs:313:12
     |
 313 | pub struct Cell<T: ?Sized> {
     |            ^^^^
note: required because it appears within the type `RefCell<LocalEncoderState>`
    --> /home/zachary/opt_mount/zachary/Programming/rust-compiler-2/library/core/src/cell.rs:822:12
     |
 822 | pub struct RefCell<T: ?Sized> {
     |            ^^^^^^^
     = note: required for `rustc_data_structures::sync::WorkerLocal<RefCell<LocalEncoderState>>` to implement `DynSync`
note: required because it appears within the type `EncoderState<D>`
    --> compiler/rustc_query_system/src/dep_graph/serialized.rs:546:8
     |
 546 | struct EncoderState<D: Deps> {
     |        ^^^^^^^^^^^^
     = note: required because it appears within the type `&EncoderState<D>`
note: required because it's used within this closure
    --> compiler/rustc_query_system/src/dep_graph/serialized.rs:719:33
     |
 719 |         let results = broadcast(|_| {
     |                                 ^^^
note: required by a bound in `rustc_data_structures::sync::broadcast`
    --> /home/zachary/opt_mount/zachary/Programming/rust-compiler-2/compiler/rustc_data_structures/src/sync/parallel.rs:239:56
     |
 239 | pub fn broadcast<R: DynSend>(op: impl Fn(usize) -> R + DynSync) -> Vec<R> {
     |                                                        ^^^^^^^ required by this bound in `broadcast`

For more information about this error, try `rustc --explain E0277`.
error: could not compile `rustc_query_system` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
Build completed unsuccessfully in 0:02:04
```

</details>
2025-11-11 21:11:52 +11:00
..
rustc Make llvm_enzyme a regular cargo feature 2025-09-15 15:31:56 +00:00
rustc_abi Rollup merge of #148518 - bjorn3:unify_compiler_doc_config, r=GuillaumeGomez 2025-11-05 21:28:29 +01:00
rustc_arena Allow internal_features lint in doc tests 2025-11-05 11:25:29 +00:00
rustc_ast Implement &pin patterns and ref pin bindings 2025-11-10 09:57:08 +08:00
rustc_ast_ir Implement &pin patterns and ref pin bindings 2025-11-10 09:57:08 +08:00
rustc_ast_lowering Implement &pin patterns and ref pin bindings 2025-11-10 09:57:08 +08:00
rustc_ast_passes Rollup merge of #148683 - fmease:rm-const_trait-attr, r=fee1-dead 2025-11-09 17:37:05 +01:00
rustc_ast_pretty Implement &pin patterns and ref pin bindings 2025-11-10 09:57:08 +08:00
rustc_attr_parsing Rollup merge of #148712 - JonathanBrouwer:cfg_select, r=jdonszelmann 2025-11-11 21:11:48 +11:00
rustc_baked_icu_data Unify the configuration of the compiler docs 2025-11-05 11:25:27 +00:00
rustc_borrowck Implement &pin patterns and ref pin bindings 2025-11-10 09:57:08 +08:00
rustc_builtin_macros Rollup merge of #148712 - JonathanBrouwer:cfg_select, r=jdonszelmann 2025-11-11 21:11:48 +11:00
rustc_codegen_cranelift rustc_target: hide TargetOptions::vendor 2025-11-09 17:43:36 -05:00
rustc_codegen_gcc Add -Zannotate-moves for profiler visibility of move/copy operations 2025-11-06 15:39:45 -08:00
rustc_codegen_llvm Auto merge of #148692 - matthiaskrgr:rollup-hryk71f, r=matthiaskrgr 2025-11-09 01:40:19 +00:00
rustc_codegen_ssa rustc_target: hide TargetOptions::vendor 2025-11-09 17:43:36 -05:00
rustc_const_eval Rollup merge of #148683 - fmease:rm-const_trait-attr, r=fee1-dead 2025-11-09 17:37:05 +01:00
rustc_data_structures Implement DynSend and DynSync for std::panic::Location. 2025-11-10 01:40:21 -06:00
rustc_driver Unify the configuration of the compiler docs 2025-11-05 11:25:27 +00:00
rustc_driver_impl Unify the configuration of the compiler docs 2025-11-05 11:25:27 +00:00
rustc_error_codes Unify the configuration of the compiler docs 2025-11-05 11:25:27 +00:00
rustc_error_messages Unify the configuration of the compiler docs 2025-11-05 11:25:27 +00:00
rustc_errors Auto merge of #148188 - Muscraft:annotate-snippets-default-on-nightly, r=estebank 2025-11-06 11:45:06 +00:00
rustc_expand Rollup merge of #148688 - JonathanBrouwer:remove_features, r=jdonszelmann 2025-11-09 13:22:35 +11:00
rustc_feature Rollup merge of #148683 - fmease:rm-const_trait-attr, r=fee1-dead 2025-11-09 17:37:05 +01:00
rustc_fluent_macro Unify the configuration of the compiler docs 2025-11-05 11:25:27 +00:00
rustc_fs_util Revert introduction of [workspace.dependencies]. 2025-09-02 19:12:54 +10:00
rustc_graphviz Allow internal_features lint in doc tests 2025-11-05 11:25:29 +00:00
rustc_hashes some cleanups in compiler 2025-10-12 08:08:30 +00:00
rustc_hir Rollup merge of #148712 - JonathanBrouwer:cfg_select, r=jdonszelmann 2025-11-11 21:11:48 +11:00
rustc_hir_analysis Rollup merge of #148771 - fmease:iat-reinstate-early-elim, r=BoxyUwU 2025-11-11 21:11:50 +11:00
rustc_hir_id rustc_hir_id: Add a comment explaining why the crate exists 2025-08-20 15:04:00 -07:00
rustc_hir_pretty Implement &pin patterns and ref pin bindings 2025-11-10 09:57:08 +08:00
rustc_hir_typeck Implement &pin patterns and ref pin bindings 2025-11-10 09:57:08 +08:00
rustc_incremental Unify the configuration of the compiler docs 2025-11-05 11:25:27 +00:00
rustc_index Unify the configuration of the compiler docs 2025-11-05 11:25:27 +00:00
rustc_index_macros Revert introduction of [workspace.dependencies]. 2025-09-02 19:12:54 +10:00
rustc_infer Unify the configuration of the compiler docs 2025-11-05 11:25:27 +00:00
rustc_interface Add -Zannotate-moves for profiler visibility of move/copy operations 2025-11-06 15:39:45 -08:00
rustc_lexer Update memchr to 2.7.6 2025-09-26 17:53:49 +02:00
rustc_lint Implement &pin patterns and ref pin bindings 2025-11-10 09:57:08 +08:00
rustc_lint_defs add warning for async 2025-11-06 13:20:12 +01:00
rustc_llvm Auto merge of #147935 - luca3s:add-rtsan, r=petrochenkov 2025-11-08 12:24:15 +00:00
rustc_log Restrict sysroot crate imports to those defined in this repo. 2025-10-15 13:17:25 +01:00
rustc_macros use declarative macro for #[derive(TryFromU32)] 2025-10-06 14:54:38 +00:00
rustc_metadata rustc_target: hide TargetOptions::vendor 2025-11-09 17:43:36 -05:00
rustc_middle Auto merge of #148397 - frank-king:feature/pin-pattern, r=Nadrieril,traviscross 2025-11-10 18:56:57 +00:00
rustc_mir_build Implement &pin patterns and ref pin bindings 2025-11-10 09:57:08 +08:00
rustc_mir_dataflow Rollup merge of #128666 - pitaj:intrinsic-overflow_checks, r=BoxyUwU 2025-11-09 13:22:23 +11:00
rustc_mir_transform Rollup merge of #147743 - 21aslade:packed-diagnostic, r=RalfJung 2025-11-09 13:22:25 +11:00
rustc_monomorphize error on non-rustic ABIs using unsized parameters 2025-11-05 12:12:10 +01:00
rustc_next_trait_solver automatically implement TrivialClone for closures and tuples 2025-11-09 17:31:19 +01:00
rustc_parse Rollup merge of #148712 - JonathanBrouwer:cfg_select, r=jdonszelmann 2025-11-11 21:11:48 +11:00
rustc_parse_format Allow internal_features lint in doc tests 2025-11-05 11:25:29 +00:00
rustc_passes Rollup merge of #148716 - camelid:finish-type_const, r=BoxyUwU 2025-11-09 17:37:07 +01:00
rustc_pattern_analysis Implement &pin patterns and ref pin bindings 2025-11-10 09:57:08 +08:00
rustc_privacy Unify the configuration of the compiler docs 2025-11-05 11:25:27 +00:00
rustc_proc_macro Revert introduction of [workspace.dependencies]. 2025-09-02 19:12:54 +10:00
rustc_public Rollup merge of #128666 - pitaj:intrinsic-overflow_checks, r=BoxyUwU 2025-11-09 13:22:23 +11:00
rustc_public_bridge Allow internal_features lint in doc tests 2025-11-05 11:25:29 +00:00
rustc_query_impl Unify the configuration of the compiler docs 2025-11-05 11:25:27 +00:00
rustc_query_system fix dev guide link in rustc_query_system/dep_graph/README.MD 2025-11-06 17:17:03 +05:00
rustc_resolve Rollup merge of #148612 - chenyukang:yukang-fix-148580-macro-hygiene-diagnostic, r=JonathanBrouwer 2025-11-09 13:22:31 +11:00
rustc_sanitizers Rollup merge of #144936 - rcvalle:rust-cfi-fix-144641, r=lcnr 2025-10-28 20:39:32 +11:00
rustc_serialize Allow internal_features lint in doc tests 2025-11-05 11:25:29 +00:00
rustc_session rustc_target: hide TargetOptions::vendor 2025-11-09 17:43:36 -05:00
rustc_span Auto merge of #135634 - joboet:trivial-clone, r=Mark-Simulacrum 2025-11-10 15:41:43 +00:00
rustc_symbol_mangling Unify the configuration of the compiler docs 2025-11-05 11:25:27 +00:00
rustc_target Rollup merge of #148760 - tamird:avoid-vendor-logic, r=madsmtm 2025-11-11 21:11:49 +11:00
rustc_thread_pool some cleanups in compiler 2025-10-12 08:08:30 +00:00
rustc_trait_selection Auto merge of #135634 - joboet:trivial-clone, r=Mark-Simulacrum 2025-11-10 15:41:43 +00:00
rustc_traits add const_of_item query and use it in normalization 2025-11-08 13:50:47 -05:00
rustc_transmute prefer to use repeat_n over repeat and take 2025-10-09 01:24:55 +08:00
rustc_ty_utils Unify the configuration of the compiler docs 2025-11-05 11:25:27 +00:00
rustc_type_ir Auto merge of #135634 - joboet:trivial-clone, r=Mark-Simulacrum 2025-11-10 15:41:43 +00:00
rustc_type_ir_macros compiler: Fix a couple issues around cargo feature unification 2025-10-31 14:14:05 -04:00
rustc_windows_rc [win] Use find-msvc-tools instead of cc to find the linker and rc on Windows 2025-09-19 12:00:30 -07:00