rust/compiler
bors c8b83785dc Auto merge of #131186 - compiler-errors:precise-capturing-borrowck, r=estebank
Try to point out when edition 2024 lifetime capture rules cause borrowck issues

Lifetime capture rules in 2024 are modified to capture more lifetimes, which sometimes lead to some non-local borrowck errors. This PR attempts to link these back together with a useful note pointing out the capture rule changes.

This is not a blocking concern, but I'd appreciate feedback (though, again, I'd like to stress that I don't want to block this PR on this): I'm worried about this note drowning in the sea of other diagnostics that borrowck emits. I was tempted to change the level of the note to `.span_warn` just so it would show up in a different color. Thoughts?

Fixes #130545

Opening as a draft first since it's stacked on #131183.
r? `@ghost`
2024-10-31 03:36:06 +00:00
..
rustc
rustc_abi compiler: rustc_abi::Abi => BackendRepr 2024-10-29 14:56:00 -07:00
rustc_arena
rustc_ast
rustc_ast_ir
rustc_ast_lowering Encode cross-crate opaque type origin 2024-10-31 01:35:13 +00:00
rustc_ast_passes
rustc_ast_pretty
rustc_attr
rustc_baked_icu_data
rustc_borrowck Try to point out when edition 2024 lifetime capture rules cause borrowck issues 2024-10-31 01:35:14 +00:00
rustc_builtin_macros
rustc_codegen_cranelift cg_clif: rustc_abi::Abi => BackendRepr 2024-10-29 15:01:01 -07:00
rustc_codegen_gcc cg_gcc: rustc_abi::Abi => BackendRepr 2024-10-29 15:01:01 -07:00
rustc_codegen_llvm Rollup merge of #132246 - workingjubilee:campaign-on-irform, r=compiler-errors 2024-10-30 14:01:37 -07:00
rustc_codegen_ssa Rollup merge of #132246 - workingjubilee:campaign-on-irform, r=compiler-errors 2024-10-30 14:01:37 -07:00
rustc_const_eval Rollup merge of #132246 - workingjubilee:campaign-on-irform, r=compiler-errors 2024-10-30 14:01:37 -07:00
rustc_data_structures
rustc_driver
rustc_driver_impl
rustc_error_codes Reject generic self types. 2024-10-30 10:48:08 +00:00
rustc_error_messages
rustc_errors
rustc_expand Rollup merge of #132332 - nnethercote:use-token_descr-more, r=estebank 2024-10-30 06:40:36 +01:00
rustc_feature
rustc_fluent_macro
rustc_fs_util
rustc_graphviz
rustc_hir Encode cross-crate opaque type origin 2024-10-31 01:35:13 +00:00
rustc_hir_analysis Auto merge of #131186 - compiler-errors:precise-capturing-borrowck, r=estebank 2024-10-31 03:36:06 +00:00
rustc_hir_pretty Remap impl-trait lifetimes on HIR instead of AST lowering. 2024-10-30 16:18:50 +00:00
rustc_hir_typeck Auto merge of #131186 - compiler-errors:precise-capturing-borrowck, r=estebank 2024-10-31 03:36:06 +00:00
rustc_incremental
rustc_index
rustc_index_macros
rustc_infer Encode cross-crate opaque type origin 2024-10-31 01:35:13 +00:00
rustc_interface
rustc_lexer
rustc_lint Rollup merge of #132246 - workingjubilee:campaign-on-irform, r=compiler-errors 2024-10-30 14:01:37 -07:00
rustc_lint_defs
rustc_llvm Rollup merge of #132342 - Zalathar:operand-bundle, r=workingjubilee 2024-10-30 06:40:38 +01:00
rustc_log
rustc_macros
rustc_metadata Auto merge of #131186 - compiler-errors:precise-capturing-borrowck, r=estebank 2024-10-31 03:36:06 +00:00
rustc_middle Auto merge of #131186 - compiler-errors:precise-capturing-borrowck, r=estebank 2024-10-31 03:36:06 +00:00
rustc_mir_build Rollup merge of #132246 - workingjubilee:campaign-on-irform, r=compiler-errors 2024-10-30 14:01:37 -07:00
rustc_mir_dataflow Rollup merge of #132246 - workingjubilee:campaign-on-irform, r=compiler-errors 2024-10-30 14:01:37 -07:00
rustc_mir_transform Rollup merge of #132246 - workingjubilee:campaign-on-irform, r=compiler-errors 2024-10-30 14:01:37 -07:00
rustc_monomorphize
rustc_next_trait_solver Merge HostPolarity and BoundConstness 2024-10-30 16:23:16 +00:00
rustc_parse Rollup merge of #132332 - nnethercote:use-token_descr-more, r=estebank 2024-10-30 06:40:36 +01:00
rustc_parse_format
rustc_passes Rollup merge of #132246 - workingjubilee:campaign-on-irform, r=compiler-errors 2024-10-30 14:01:37 -07:00
rustc_pattern_analysis
rustc_privacy Merge HostPolarity and BoundConstness 2024-10-30 16:23:16 +00:00
rustc_query_impl
rustc_query_system
rustc_resolve Review comments. 2024-10-30 16:20:49 +00:00
rustc_sanitizers
rustc_serialize
rustc_session fix libc call from i8 to u8 2024-10-30 09:17:44 -04:00
rustc_smir compiler: rustc_abi::Abi => BackendRepr 2024-10-29 14:56:00 -07:00
rustc_span
rustc_symbol_mangling
rustc_target compiler: rustc_abi::Abi => BackendRepr 2024-10-29 14:56:00 -07:00
rustc_trait_selection Auto merge of #131186 - compiler-errors:precise-capturing-borrowck, r=estebank 2024-10-31 03:36:06 +00:00
rustc_traits
rustc_transmute
rustc_ty_utils Auto merge of #131186 - compiler-errors:precise-capturing-borrowck, r=estebank 2024-10-31 03:36:06 +00:00
rustc_type_ir Merge HostPolarity and BoundConstness 2024-10-30 16:23:16 +00:00
rustc_type_ir_macros
stable_mir