Skip to content

Commit 5bbdd69

Browse files
P-E-Pphilberty
authored andcommitted
Copy cfg_attrs instead setting it to itself
CfgAttribute copy constructor did not copy cfg_attrs properly. gcc/rust/ChangeLog: * ast/rust-cond-compilation.h: Copy cfg_attrs Signed-off-by: Pierre-Emmanuel Patry <[email protected]>
1 parent 31700b9 commit 5bbdd69

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gcc/rust/ast/rust-cond-compilation.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ class CfgAttrAttribute
226226
CfgAttrAttribute (CfgAttrAttribute const &other)
227227
: config_to_include (
228228
other.config_to_include->clone_configuration_predicate ()),
229-
cfg_attrs (cfg_attrs)
229+
cfg_attrs (other.cfg_attrs)
230230
{}
231231

232232
// Overloaded assignment operator to clone

0 commit comments

Comments
 (0)