Allow specifying certain types we shouldn't derive/impl Debug for
Add --no-debug <regex> and Builder::no_debug(String) to supply regexes for matching against types that we should not derive or implement Debug for.
Adding this feature involves:
-
[ ] Adding a new
RegexSetmember tobindgen::Builder(similar to thewhitelisted_typesset). -
[ ] A
Buildermethod to add strings to thatRegexSet. -
[ ] Plumbing in
src/options.rsto convert--no-debug <regex>CLI flags into invocations of the builder method. -
[ ] Making the
MonotoneFramework::constrainfunction insrc/ir/analysis/derive_debug.rscheck if the given item is explicitly marked not to beDebug, and if so, inserting it into theself.cannot_derive_debugset viareturn self.insert(id). -
[ ] Skipping any item explicitly marked not to be
Debuginsrc/codegen/derive_debug.rsso that we don't generate animpl Debug for ...for these types when--impl-debugis passed. -
[ ] Tests!
-
[ ] When
--impl-debugis also supplied -
[ ] When
--impl-debugis not also supplied -
[ ] When the no-debug type is transitively referenced by a whitelisted item
-
[ ] When the no-debug type is explicitly whitelisted
-
[ ] When the no-debug type is marked opaque
-
cc @jdm
Hey! I'd like to give this one a shot.
@njayinthehouse Hi! Feel free to ask if you run into any questions!
Hello, there seems no activity on this issue, I would like to give a try. @highfive: assign me
Hey @ivanovaleksey! Thanks for your interest in working on this issue. It's now assigned to you!
@ivanovaleksey hi! dont hestiate to ask questions, i will glad to answer!
Already implemented