about summary refs log tree commit diff
path: root/compiler/rustc_builtin_macros/src
diff options
context:
space:
mode:
authorOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2024-07-05 15:00:40 +0000
committerOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2024-07-05 15:00:40 +0000
commit7dca61b68b50b7e38bf3cec027eec2002755b2a4 (patch)
treef4e76a86141371f14f65d44a8c3024e3622005af /compiler/rustc_builtin_macros/src
parentd2e6cf7fa78500d6c264e35468278aeffd806258 (diff)
downloadrust-7dca61b68b50b7e38bf3cec027eec2002755b2a4.tar.gz
rust-7dca61b68b50b7e38bf3cec027eec2002755b2a4.zip
Use `ControlFlow` results for visitors that are only looking for a single value
Diffstat (limited to 'compiler/rustc_builtin_macros/src')
-rw-r--r--compiler/rustc_builtin_macros/src/deriving/default.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_builtin_macros/src/deriving/default.rs b/compiler/rustc_builtin_macros/src/deriving/default.rs
index 577523a1d5a..7a65ed97f00 100644
--- a/compiler/rustc_builtin_macros/src/deriving/default.rs
+++ b/compiler/rustc_builtin_macros/src/deriving/default.rs
@@ -240,7 +240,7 @@ fn has_a_default_variant(item: &Annotatable) -> bool {
             if v.attrs.iter().any(|attr| attr.has_name(kw::Default)) {
                 ControlFlow::Break(())
             } else {
-                // no need to subrecurse.
+                // no need to walk the variant, we are only looking for top level variants
                 ControlFlow::Continue(())
             }
         }