]> git.lizzy.rs Git - rust.git/commitdiff
Fix truncate of 'bound params stack' by using the correct length
authorAudun Halland <audun.halland@pm.me>
Wed, 29 Sep 2021 01:18:56 +0000 (03:18 +0200)
committerAudun Halland <audun.halland@pm.me>
Wed, 29 Sep 2021 01:18:56 +0000 (03:18 +0200)
compiler/rustc_builtin_macros/src/deriving/generic/mod.rs

index cd013107a0151b6c95cabc580d712669032e04ce..0f88995846cc18a31e021a3827c20dbda0649f54 100644 (file)
@@ -377,7 +377,7 @@ fn visit_poly_trait_ref(
             trait_ref: &'a ast::PolyTraitRef,
             modifier: &'a ast::TraitBoundModifier,
         ) {
-            let stack_len = trait_ref.bound_generic_params.len();
+            let stack_len = self.bound_generic_params_stack.len();
             self.bound_generic_params_stack
                 .extend(trait_ref.bound_generic_params.clone().into_iter());