diff options
| author | Audun Halland <audun.halland@pm.me> | 2021-09-29 03:18:56 +0200 |
|---|---|---|
| committer | Audun Halland <audun.halland@pm.me> | 2021-09-29 03:18:56 +0200 |
| commit | e559867d8622bf2f9c09e66d384157a3b836043f (patch) | |
| tree | e1bfa0e64f7718dd1e60e3aeacbcc4d49dadabcc | |
| parent | f0e99827f8408cecb3bd00d45a4ed30b4ab1d145 (diff) | |
| download | rust-e559867d8622bf2f9c09e66d384157a3b836043f.tar.gz rust-e559867d8622bf2f9c09e66d384157a3b836043f.zip | |
Fix truncate of 'bound params stack' by using the correct length
| -rw-r--r-- | compiler/rustc_builtin_macros/src/deriving/generic/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_builtin_macros/src/deriving/generic/mod.rs b/compiler/rustc_builtin_macros/src/deriving/generic/mod.rs index cd013107a01..0f88995846c 100644 --- a/compiler/rustc_builtin_macros/src/deriving/generic/mod.rs +++ b/compiler/rustc_builtin_macros/src/deriving/generic/mod.rs @@ -377,7 +377,7 @@ fn find_type_parameters( 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()); |
