Stream: t-compiler/help

Topic: ty::walk::TypeWalker depth


Philipp Hansch (Jan 24 2020 at 06:11, on Zulip):

Does ty::walk::TypeWalker also visit the types of struct's fields or enum variants? I'm essentially trying to find out if a type or any of the types of the fields/variants implement Drop.

Philipp Hansch (Jan 24 2020 at 06:14, on Zulip):

For reference, this is for fixing a bug in Clippy's const_fn lint: https://github.com/rust-lang/rust-clippy/pull/4981#issuecomment-572913738

Matthew Jasper (Jan 24 2020 at 23:47, on Zulip):

ty.needs_drop already does this.

Philipp Hansch (Jan 25 2020 at 07:54, on Zulip):

thanks! somehow I missed that method and it seems to work :tada:

Last update: Feb 25 2020 at 03:55UTC