rust/compiler
Matthias Krüger d26e07b91a
Rollup merge of #106747 - yanchen4791:issue-105507-fix, r=estebank
Add 'static lifetime suggestion when GAT implied 'static requirement from HRTB

Fix for issue #105507

The problem:
When generic associated types (GATs) are from higher-ranked trait bounds (HRTB), they are implied 'static requirement (see
[Implied 'static requirement from higher-ranked trait bounds](https://blog.rust-lang.org/2022/10/28/gats-stabilization.html#implied-static-requirement-from-higher-ranked-trait-bounds) for more details). If the user did not explicitly specify the `'static` lifetime when using the GAT, the current error message will only point out the type `does not live long enough` where the type is used, but not where the GAT is specified and how to fix the problem.

The solution:
Add notes at the span where the problematic GATs are specified and suggestions of how to fix the problem by adding `'static` lifetime at the right spans.
2023-01-18 06:59:20 +01:00
..
rustc
rustc_abi Rollup merge of #104505 - WaffleLapkin:no-double-spaces-in-comments, r=jackh726 2023-01-17 20:21:25 +01:00
rustc_apfloat compiler: remove unnecessary imports and qualified paths 2022-12-10 18:45:34 +01:00
rustc_arena compiler: remove unnecessary imports and qualified paths 2022-12-10 18:45:34 +01:00
rustc_ast Rollup merge of #104505 - WaffleLapkin:no-double-spaces-in-comments, r=jackh726 2023-01-17 20:21:25 +01:00
rustc_ast_lowering Rollup merge of #104505 - WaffleLapkin:no-double-spaces-in-comments, r=jackh726 2023-01-17 20:21:25 +01:00
rustc_ast_passes gate const closures 2023-01-12 02:28:37 +00:00
rustc_ast_pretty Remove double spaces after dots in comments 2023-01-17 08:09:33 +00:00
rustc_attr Fix uninlined_format_args for some compiler crates 2023-01-05 19:01:12 +01:00
rustc_baked_icu_data Update crate documentation of rustc_baked_icu_data crate 2022-11-18 14:46:36 -08:00
rustc_borrowck Rollup merge of #106747 - yanchen4791:issue-105507-fix, r=estebank 2023-01-18 06:59:20 +01:00
rustc_builtin_macros Remove double spaces after dots in comments 2023-01-17 08:09:33 +00:00
rustc_codegen_cranelift Remove double spaces after dots in comments 2023-01-17 08:09:33 +00:00
rustc_codegen_gcc Change src/test to tests in source files, fix tidy and tests 2023-01-11 09:32:13 +00:00
rustc_codegen_llvm Auto merge of #106998 - matthiaskrgr:rollup-hmfisji, r=matthiaskrgr 2023-01-17 20:53:05 +00:00
rustc_codegen_ssa Rollup merge of #104505 - WaffleLapkin:no-double-spaces-in-comments, r=jackh726 2023-01-17 20:21:25 +01:00
rustc_const_eval Rollup merge of #104505 - WaffleLapkin:no-double-spaces-in-comments, r=jackh726 2023-01-17 20:21:25 +01:00
rustc_data_structures Rollup merge of #104505 - WaffleLapkin:no-double-spaces-in-comments, r=jackh726 2023-01-17 20:21:25 +01:00
rustc_driver Rollup merge of #104505 - WaffleLapkin:no-double-spaces-in-comments, r=jackh726 2023-01-17 20:21:25 +01:00
rustc_error_codes Rollup merge of #104505 - WaffleLapkin:no-double-spaces-in-comments, r=jackh726 2023-01-17 20:21:25 +01:00
rustc_error_messages Rollup merge of #106949 - compiler-errors:is-poly, r=BoxyUwU 2023-01-17 05:25:23 +01:00
rustc_errors Remove double spaces after dots in comments 2023-01-17 08:09:33 +00:00
rustc_expand Rollup merge of #104505 - WaffleLapkin:no-double-spaces-in-comments, r=jackh726 2023-01-17 20:21:25 +01:00
rustc_feature Auto merge of #106004 - fee1-dead-contrib:const-closures, r=oli-obk 2023-01-13 05:04:48 +00:00
rustc_fs_util Remove useless borrows and derefs 2022-12-01 17:34:43 +00:00
rustc_graphviz Fix uninlined_format_args for some compiler crates 2023-01-05 19:01:12 +01:00
rustc_hir Remove double spaces after dots in comments 2023-01-17 08:09:33 +00:00
rustc_hir_analysis Rollup merge of #106970 - kylematsuda:earlybinder-item-bounds, r=lcnr 2023-01-17 20:21:28 +01:00
rustc_hir_pretty parse const closures 2023-01-12 02:28:37 +00:00
rustc_hir_typeck Rollup merge of #106963 - compiler-errors:scope-expr-dupe, r=michaelwoerister 2023-01-17 20:21:27 +01:00
rustc_incremental Remove double spaces after dots in comments 2023-01-17 08:09:33 +00:00
rustc_index Fix uninlined_format_args for some compiler crates 2023-01-05 19:01:12 +01:00
rustc_infer Rollup merge of #106970 - kylematsuda:earlybinder-item-bounds, r=lcnr 2023-01-17 20:21:28 +01:00
rustc_interface Rollup merge of #106678 - Veykril:proc-macro-panic-abort, r=eholk 2023-01-13 19:16:43 +01:00
rustc_lexer Remove double spaces after dots in comments 2023-01-17 08:09:33 +00:00
rustc_lint Rollup merge of #104505 - WaffleLapkin:no-double-spaces-in-comments, r=jackh726 2023-01-17 20:21:25 +01:00
rustc_lint_defs Bump IMPLIED_BOUNDS_ENTAILMENT to Deny + ReportNow 2023-01-12 20:44:54 +00:00
rustc_llvm Remove double spaces after dots in comments 2023-01-17 08:09:33 +00:00
rustc_log Add log-backtrace option to show backtraces along with logging 2023-01-12 00:17:48 +09:00
rustc_macros Support eager subdiagnostics again 2023-01-11 14:20:34 -08:00
rustc_metadata Rollup merge of #104505 - WaffleLapkin:no-double-spaces-in-comments, r=jackh726 2023-01-17 20:21:25 +01:00
rustc_middle Rollup merge of #106747 - yanchen4791:issue-105507-fix, r=estebank 2023-01-18 06:59:20 +01:00
rustc_mir_build Rollup merge of #104505 - WaffleLapkin:no-double-spaces-in-comments, r=jackh726 2023-01-17 20:21:25 +01:00
rustc_mir_dataflow Remove double spaces after dots in comments 2023-01-17 08:09:33 +00:00
rustc_mir_transform Rollup merge of #104505 - WaffleLapkin:no-double-spaces-in-comments, r=jackh726 2023-01-17 20:21:25 +01:00
rustc_monomorphize fix various subst_identity vs skip_binder 2023-01-14 00:30:03 -07:00
rustc_parse Rollup merge of #104505 - WaffleLapkin:no-double-spaces-in-comments, r=jackh726 2023-01-17 20:21:25 +01:00
rustc_parse_format Fix uninlined_format_args for some compiler crates 2023-01-05 19:01:12 +01:00
rustc_passes Rollup merge of #104505 - WaffleLapkin:no-double-spaces-in-comments, r=jackh726 2023-01-17 20:21:25 +01:00
rustc_plugin_impl
rustc_privacy change impl_trait_ref query to return EarlyBinder; remove bound_impl_trait_ref query; add EarlyBinder to impl_trait_ref in metadata 2023-01-14 00:29:56 -07:00
rustc_query_impl Fix uninlined_format_args for some compiler crates 2023-01-05 19:01:12 +01:00
rustc_query_system Remove double spaces after dots in comments 2023-01-17 08:09:33 +00:00
rustc_resolve Rollup merge of #104505 - WaffleLapkin:no-double-spaces-in-comments, r=jackh726 2023-01-17 20:21:25 +01:00
rustc_save_analysis rename get_parent_node to parent_id 2023-01-04 00:43:13 +00:00
rustc_serialize compiler: remove unnecessary imports and qualified paths 2022-12-10 18:45:34 +01:00
rustc_session Rollup merge of #104505 - WaffleLapkin:no-double-spaces-in-comments, r=jackh726 2023-01-17 20:21:25 +01:00
rustc_smir
rustc_span Rollup merge of #104505 - WaffleLapkin:no-double-spaces-in-comments, r=jackh726 2023-01-17 20:21:25 +01:00
rustc_symbol_mangling Add type flags support for Ty and Const late-bound regions 2023-01-08 03:37:20 +00:00
rustc_target Rollup merge of #104505 - WaffleLapkin:no-double-spaces-in-comments, r=jackh726 2023-01-17 20:21:25 +01:00
rustc_trait_selection Rollup merge of #106970 - kylematsuda:earlybinder-item-bounds, r=lcnr 2023-01-17 20:21:28 +01:00
rustc_traits Rollup merge of #104505 - WaffleLapkin:no-double-spaces-in-comments, r=jackh726 2023-01-17 20:21:25 +01:00
rustc_transmute Fix uninlined_format_args for some compiler crates 2023-01-05 19:01:12 +01:00
rustc_ty_utils Auto merge of #106294 - Nilstrieb:noundef-everything, r=nikic 2023-01-17 17:39:48 +00:00
rustc_type_ir Remove double spaces after dots in comments 2023-01-17 08:09:33 +00:00