rust/compiler
Matthias Krüger 06b2f6208a
Rollup merge of #136490 - Skepfyr:no-field-rest-pattern-attrs, r=compiler-errors
Do not allow attributes on struct field rest patterns

Fixes #81282.

This removes support for attributes on struct field rest patterns (the `..` bit) from the parser. Previously any attributes were being parsed but dropped from the AST, so didn't work and were deleted by rustfmt.

This needs an equivalent change to the reference but I wanted to see how this PR is received first.
The error message it produces isn't great, however it does match the error you get if you try to add attributes to .. in struct expressions atm, although I can understand wanting to do better given this was previously accepted. I think I could move attribute parsing back up to where it was and then emit a specific new error for this case, however I might need some guidance as this is the first time I've messed around inside the compiler.

While this is technically breaking I don't think it's much of an issue: attributes in this position don't currently do anything and rustfmt outright deletes them, meaning it's incredibly unlikely to affect anyone. I have already made the equivalent change to *add* support for attributes (mostly) but the conversation in the linked issue suggested it would be more reasonable to just remove them (and pointed out it's much easier to add support later if we realise we need them).
2025-02-15 20:14:58 +01:00
..
rustc switch jemalloc-sys back to tikv-jemalloc-sys, and update to 0.6.0 2024-12-03 08:56:33 +00:00
rustc_abi Split out the extern_system_varargs feature 2025-02-12 19:57:45 -08:00
rustc_arena Add inherent versions of MaybeUninit methods for slices 2025-01-11 23:57:00 -05:00
rustc_ast Add a TyPat in the AST to reuse the generic arg lowering logic 2025-02-11 08:51:05 +00:00
rustc_ast_ir Add sugar for &pin (const|mut) types 2024-10-07 11:15:04 -07:00
rustc_ast_lowering Rollup merge of #136901 - workingjubilee:stabilize-externabi-hashing-forever, r=compiler-errors 2025-02-12 20:30:55 +01:00
rustc_ast_passes compiler: remove rustc_target reexport of rustc_abi::HashStableContext 2025-02-11 18:55:48 -08:00
rustc_ast_pretty Add a TyPat in the AST to reuse the generic arg lowering logic 2025-02-11 08:51:05 +00:00
rustc_attr_data_structures rustc_allowed_through_unstable_modules: require deprecation message 2025-02-02 12:36:12 +01:00
rustc_attr_parsing Rustfmt 2025-02-08 22:12:13 +00:00
rustc_baked_icu_data Delete the cfg(not(parallel)) serial compiler 2024-11-12 13:38:58 +00:00
rustc_borrowck further simplify a match 2025-02-14 02:44:22 -08:00
rustc_builtin_macros Rollup merge of #136646 - oli-obk:pattern-types-ast, r=BoxyUwU 2025-02-12 06:07:37 +01:00
rustc_codegen_cranelift Make -O mean -C opt-level=3 2025-02-13 19:47:55 +00:00
rustc_codegen_gcc Auto merge of #136575 - scottmcm:nsuw-math, r=nikic 2025-02-14 14:21:29 +00:00
rustc_codegen_llvm Auto merge of #136575 - scottmcm:nsuw-math, r=nikic 2025-02-14 14:21:29 +00:00
rustc_codegen_ssa Auto merge of #136575 - scottmcm:nsuw-math, r=nikic 2025-02-14 14:21:29 +00:00
rustc_const_eval add a doc comment 2025-02-15 08:21:27 +01:00
rustc_data_structures compiler/rustc_data_structures/src/sync/worker_local.rs: delete "unsafe impl Sync" 2025-02-11 10:21:17 +03:00
rustc_driver
rustc_driver_impl Reject macro calls inside of #![crate_name] 2025-02-15 16:47:30 +01:00
rustc_error_codes fix the error code document 2025-02-10 04:36:49 +08:00
rustc_error_messages tree-wide: parallel: Fully removed all Lrc, replaced with Arc 2025-02-03 13:25:57 +03:00
rustc_errors Trim suggestion parts to the subset that is purely additive 2025-02-14 00:44:10 -08:00
rustc_expand Reject macro calls inside of #![crate_name] 2025-02-15 16:47:30 +01:00
rustc_feature Auto merge of #136965 - jhpratt:rollup-bsnqvmf, r=jhpratt 2025-02-13 11:45:11 +00: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 Rustfmt 2025-02-08 22:12:13 +00:00
rustc_hir Implement and use BikeshedGuaranteedNoDrop for union/unsafe field validity 2025-02-13 03:45:04 +00:00
rustc_hir_analysis Auto merge of #136593 - lukas-code:ty-value-perf, r=oli-obk 2025-02-13 15:27:30 +00:00
rustc_hir_pretty Rustfmt 2025-02-08 22:12:13 +00:00
rustc_hir_typeck eagerly prove WF when resolving fully qualified paths 2025-02-14 00:04:22 +01:00
rustc_incremental Reject macro calls inside of #![crate_name] 2025-02-15 16:47:30 +01:00
rustc_index Rustfmt 2025-02-08 22:12:13 +00:00
rustc_index_macros update rustc_index_macros feature handling 2024-12-19 20:32:12 +03:00
rustc_infer Rustfmt 2025-02-08 22:12:13 +00:00
rustc_interface Reject macro calls inside of #![crate_name] 2025-02-15 16:47:30 +01:00
rustc_lexer Rustfmt 2025-02-08 22:12:13 +00:00
rustc_lint Remove unnecessary check code in unused_delims 2025-02-15 07:35:28 +08:00
rustc_lint_defs Implement lint for definition site item shadowing too 2025-02-13 05:45:53 +00:00
rustc_llvm Rollup merge of #136419 - EnzymeAD:autodiff-tests, r=onur-ozkan,jieyouxu 2025-02-10 16:38:23 +01:00
rustc_log Avoid naming variables str 2025-01-07 14:30:02 +02:00
rustc_macros Rustfmt 2025-02-08 22:12:13 +00:00
rustc_metadata Decode metadata buffer in one go 2025-02-14 16:23:07 +00:00
rustc_middle Rollup merge of #137002 - chenyukang:fix-early-lint-check-desc, r=compiler-errors 2025-02-14 14:05:25 -08:00
rustc_mir_build More comments for lower_inline_const 2025-02-14 23:35:54 +11:00
rustc_mir_dataflow Move drop elaboration infrastructure. 2025-02-14 16:05:34 +11:00
rustc_mir_transform Rollup merge of #137008 - nnethercote:mv-code-into-rustc_mir_transform, r=oli-obk 2025-02-14 16:23:34 +01:00
rustc_monomorphize Normalize closure instance before eagerly monomorphizing it 2025-02-14 19:18:43 +00:00
rustc_next_trait_solver adjust derive_error 2025-02-13 23:49:09 +01:00
rustc_parse Rollup merge of #136490 - Skepfyr:no-field-rest-pattern-attrs, r=compiler-errors 2025-02-15 20:14:58 +01:00
rustc_parse_format Rustfmt 2025-02-08 22:12:13 +00:00
rustc_passes Rollup merge of #136833 - workingjubilee:let-the-impossible-be-impossible, r=compiler-errors 2025-02-11 18:04:44 +01:00
rustc_pattern_analysis Get rid of mir::Const::from_ty_const 2025-01-20 04:26:44 +00:00
rustc_privacy Make comma separated lists of anything easier to make for errors 2025-01-31 20:36:44 +00:00
rustc_query_impl Removed dependency on the field-offset crate. 2025-02-05 17:56:06 +01:00
rustc_query_system Rollup merge of #136858 - safinaskar:parallel-cleanup-2025-02-11-07-54, r=SparrowLii 2025-02-13 03:53:31 -05:00
rustc_resolve Rollup merge of #136869 - chenyukang:yukang-fix-133713-let-binding, r=estebank 2025-02-13 17:46:08 -08:00
rustc_sanitizers check the types in ty::Value to value conversion 2025-01-30 18:13:16 +01:00
rustc_serialize Fix explicit_iter_loop in rustc_serialize 2024-10-16 15:44:16 +02:00
rustc_session Reject macro calls inside of #![crate_name] 2025-02-15 16:47:30 +01:00
rustc_smir Auto merge of #136593 - lukas-code:ty-value-perf, r=oli-obk 2025-02-13 15:27:30 +00:00
rustc_span Rollup merge of #136460 - real-eren:simplify-rustc_span-analyze, r=Noratrieb 2025-02-13 21:37:50 -08:00
rustc_symbol_mangling compiler: remove AbiDatas 2025-02-11 20:18:01 -08:00
rustc_target add x86-sse2 (32bit) ABI that requires SSE2 target feature 2025-02-14 19:47:52 +01:00
rustc_trait_selection Auto merge of #137010 - workingjubilee:rollup-g00c07v, r=workingjubilee 2025-02-14 06:13:42 +00:00
rustc_traits Auto merge of #136011 - compiler-errors:query-norm-vaniquishes-us, r=jackh726 2025-01-29 02:12:12 +00:00
rustc_transmute transmutability: fix ICE when passing wrong ADT to ASSUME 2025-02-08 05:44:29 +01:00
rustc_ty_utils Auto merge of #136593 - lukas-code:ty-value-perf, r=oli-obk 2025-02-13 15:27:30 +00:00
rustc_type_ir normalizes-to rework rigid alias handling 2025-02-13 20:19:11 +00:00
rustc_type_ir_macros Rustfmt 2025-02-08 22:12:13 +00:00
stable_mir Extend the renaming to coerce_unsafe_ptr 2025-02-10 13:01:55 +00:00