Stream: t-compiler

Topic: unconditional recursion lint


Bastian Kauschke (Apr 28 2020 at 09:57, on Zulip):

https://github.com/rust-lang/rust/issues/57965

@Jonas Schievink Do you currently have enough time to review a PR implementing this.
WIll also probably need some help along the way

Jonas Schievink (Apr 28 2020 at 09:58, on Zulip):

Oh yeah I'd love to see this happen! Not sure I can help much though.

Bastian Kauschke (Apr 29 2020 at 20:51, on Zulip):

Ok,looked into this and have a general idea on how this may work.

My idea is to use par_body_owners at the end of librustc_interface::passes::analysis to walk through all impls and do something similar to the current unconditional_recursion check (except on optimized_mir instead of mir_built, as I don't know how to deal with Steal otherwise). We now actually follow function calls under the following conditions:

Bastian Kauschke (Apr 29 2020 at 20:52, on Zulip):

This would require optimized_mir for functions which wouldn't be built otherwise afaict... ?

Last update: May 29 2020 at 17:10UTC