usx95 wrote: I see two parts here: 1. Making the diagnostics helpful: Agreed that this would be very confusing atm. In that aspect we still have `-Wexperimental-lifetime-suggestions` which would give at least the locations of all inferred annotations. Also I think, in its most helpful form, the lifetime analysis in general should trace down all the origins involved in the loan propagation and not just the inferred annotations. This can be done at a later stage where we target to make the diagnostics more helpful in general. 2. Inference behind a flag: I think it makes sense to do this behind a **frontend flag** in the short term. Longer term, the solution to `1` would by-design give us a way to differentiate between findings powered by inference vs explicit annotations and then this enablement can be done more precisely by **separate warning-groups**.
We would introduce `-fexperimental-lifetime-safety-inference` as a language option. Does that make sense @Xazax-hun ? https://github.com/llvm/llvm-project/pull/171081 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
