rust/compiler
Dylan DPC 980579a5e9
Rollup merge of #99030 - rust-lang:notriddle/field-recovery, r=petrochenkov
diagnostics: error messages when struct literals fail to parse

If an expression is supplied where a field is expected, the parser can become convinced that it's a shorthand field syntax when it's not.

This PR addresses it by explicitly recording the permitted `:` token immediately after the identifier, and also adds a suggestion to insert the name of the field if it looks like a complex expression.

Fixes #98917
2022-07-13 19:32:35 +05:30
..
rustc Don't rerun the build script for the compiler each time on linux 2022-07-10 23:57:25 -05:00
rustc_apfloat Update smallvec to 1.8.1. 2022-06-27 08:48:55 +10:00
rustc_arena Rollup merge of #97711 - Nilstrieb:rustc-arena-ub, r=wesleywiser 2022-07-07 18:06:49 +05:30
rustc_ast Auto merge of #98758 - nnethercote:more-derive-output-improvements, r=Mark-Simulacrum 2022-07-08 12:44:14 +00:00
rustc_ast_lowering extract method to read scrutinee conditionally 2022-07-11 23:20:38 +02:00
rustc_ast_passes Suggest using block for extern "abi" fn with no body 2022-07-06 13:27:53 +01:00
rustc_ast_pretty ast: Add span to Extern 2022-07-02 23:30:03 +01:00
rustc_attr UnsafeCell now has no niches, ever. 2022-07-07 10:46:22 +00:00
rustc_borrowck Rollup merge of #99140 - TaKO8Ki:implement-is-accessible-span, r=fee1-dead 2022-07-11 15:19:32 +05:30
rustc_builtin_macros Minor updates based on review comments. 2022-07-09 10:04:09 +10:00
rustc_codegen_cranelift Partially stabilize const_slice_from_raw_parts 2022-07-09 23:20:02 +02:00
rustc_codegen_gcc fix cranelift and gcc backends 2022-07-09 07:27:29 -04:00
rustc_codegen_llvm don't allow ZST in ScalarInt 2022-07-09 07:27:29 -04:00
rustc_codegen_ssa tweak names and output and bless 2022-07-09 07:43:56 -04:00
rustc_const_eval Rollup merge of #99011 - oli-obk:UnsoundCell, r=eddyb 2022-07-13 19:32:34 +05:30
rustc_data_structures Allow to create definitions inside the query system. 2022-07-06 22:50:55 +02:00
rustc_driver Fix bug in rustdoc -Whelp 2022-07-02 02:11:49 -05:00
rustc_error_codes Rollup merge of #97423 - m-ou-se:memory-ordering-intrinsics, r=tmiasko 2022-06-29 10:28:18 +05:30
rustc_error_messages use subdiagnostic for message 2022-07-10 23:43:46 +00:00
rustc_errors Rollup merge of #99075 - danobi:dup_type_hint_sugg, r=petrochenkov 2022-07-11 22:39:05 +02:00
rustc_expand use subdiagnostic for message 2022-07-10 23:43:46 +00:00
rustc_feature UnsafeCell now has no niches, ever. 2022-07-07 10:46:22 +00:00
rustc_fs_util
rustc_graphviz Fully stabilize NLL 2022-06-03 17:16:41 -04:00
rustc_hir add tests for async await 2022-07-11 23:20:39 +02:00
rustc_hir_pretty move else block into the Local struct 2022-07-11 23:20:37 +02:00
rustc_incremental Rollup merge of #98844 - cjgillot:deep-visit, r=jyn514 2022-07-07 20:33:24 +02:00
rustc_index Use a bitset instead of a hash map in HIR ID validator 2022-07-04 08:30:13 +02:00
rustc_infer add tests for async await 2022-07-11 23:20:39 +02:00
rustc_interface Implement support for DWARF version 5. 2022-07-08 11:31:08 -07:00
rustc_lexer fix typo in comment 2022-06-28 19:59:09 +05:30
rustc_lint Rollup merge of #99011 - oli-obk:UnsoundCell, r=eddyb 2022-07-13 19:32:34 +05:30
rustc_lint_defs fix documentation 2022-07-13 04:49:32 +00:00
rustc_llvm llvm-wrapper: adapt for LLVM API change 2022-07-12 16:00:52 +00:00
rustc_log
rustc_macros Use dashes instead of underscores in fluent names 2022-07-08 03:37:36 +00:00
rustc_metadata Auto merge of #99024 - matthiaskrgr:rollup-8ygpcpg, r=matthiaskrgr 2022-07-07 20:55:34 +00:00
rustc_middle Rollup merge of #99011 - oli-obk:UnsoundCell, r=eddyb 2022-07-13 19:32:34 +05:30
rustc_mir_build add tests for async await 2022-07-11 23:20:39 +02:00
rustc_mir_dataflow Rollup merge of #99022 - pierwill:always-storage-live-locals, r=pierwill 2022-07-09 12:52:50 +02:00
rustc_mir_transform Rollup merge of #98574 - dingxiangfei2009:let-else-thir, r=oli-obk 2022-07-13 19:32:33 +05:30
rustc_monomorphize Update TypeVisitor paths 2022-07-06 06:41:53 +01:00
rustc_parse Rollup merge of #99030 - rust-lang:notriddle/field-recovery, r=petrochenkov 2022-07-13 19:32:35 +05:30
rustc_parse_format
rustc_passes Rollup merge of #99011 - oli-obk:UnsoundCell, r=eddyb 2022-07-13 19:32:34 +05:30
rustc_plugin_impl remove currently unused deps 2022-06-13 22:20:51 +03:00
rustc_privacy move else block into the Local struct 2022-07-11 23:20:37 +02:00
rustc_query_impl Use a dedicated DepKind for the forever-red node. 2022-07-06 23:20:12 +02:00
rustc_query_system Auto merge of #99028 - tmiasko:inline, r=estebank 2022-07-09 04:34:51 +00:00
rustc_resolve Auto merge of #98637 - cjgillot:bare-trait-anon-lt, r=petrochenkov 2022-07-11 17:09:37 +00:00
rustc_save_analysis move else block into the Local struct 2022-07-11 23:20:37 +02:00
rustc_serialize Update smallvec to 1.8.1. 2022-06-27 08:48:55 +10:00
rustc_session Implement support for DWARF version 5. 2022-07-08 11:31:08 -07:00
rustc_smir Rustfmt 2022-06-02 10:29:00 +00:00
rustc_span Rollup merge of #99011 - oli-obk:UnsoundCell, r=eddyb 2022-07-13 19:32:34 +05:30
rustc_symbol_mangling Allow to create definitions inside the query system. 2022-07-06 22:50:55 +02:00
rustc_target rustc_target: Flip the default for TargetOptions::executables to true 2022-07-11 23:23:51 +03:00
rustc_trait_selection Rollup merge of #98574 - dingxiangfei2009:let-else-thir, r=oli-obk 2022-07-13 19:32:33 +05:30
rustc_traits Update TypeVisitor paths 2022-07-06 06:41:53 +01:00
rustc_ty_utils Update TypeVisitor paths 2022-07-06 06:41:53 +01:00
rustc_type_ir Auto merge of #98614 - oli-obk:take_unsound_opaque_types, r=wesleywiser 2022-07-08 17:55:26 +00:00
rustc_typeck Rollup merge of #98574 - dingxiangfei2009:let-else-thir, r=oli-obk 2022-07-13 19:32:33 +05:30