]> git.ipfire.org Git - thirdparty/gcc.git/commit
gccrs: Clear the substitution callbacks when copying ArgumentMappings
authorPhilip Herron <herron.philip@googlemail.com>
Fri, 27 Jan 2023 18:31:11 +0000 (18:31 +0000)
committerPhilip Herron <herron.philip@googlemail.com>
Sun, 5 Feb 2023 00:10:48 +0000 (00:10 +0000)
commitfc6c5f7dc2062d222a99157fb514d71ad87b1b45
tree624bc26e7a42c872e574e91cc1807f31cde5185b
parent50856ddba4689710dd53865e96cc7da9885b7b51
gccrs: Clear the substitution callbacks when copying ArgumentMappings

When we set the callback on substitutions this is not safe to be copied
around since we store the used argument mappings and can reuse them in
different contexts. This clears the callback on copy's to make it safer.

Signed-off-by: Philip Herron <herron.philip@googlemail.com>
gcc/rust/ChangeLog:

* typecheck/rust-tyty-subst.cc: update copy constructors
gcc/rust/typecheck/rust-tyty-subst.cc