diff options
author | Philip Herron <philip.herron@embecosm.com> | 2022-10-17 11:35:26 +0100 |
---|---|---|
committer | Philip Herron <philip.herron@embecosm.com> | 2022-10-17 11:37:23 +0100 |
commit | 0a52177612f6e855732c6ded77a04ba40dfb0d19 (patch) | |
tree | f5f5a48029b5a03dd651cb78e2ae8c880c74e0e4 /gcc/rust/backend/rust-compile-expr.h | |
parent | 381e061438836b7ca360c7741e9a13ec6d643b1d (diff) | |
download | gcc-0a52177612f6e855732c6ded77a04ba40dfb0d19.zip gcc-0a52177612f6e855732c6ded77a04ba40dfb0d19.tar.gz gcc-0a52177612f6e855732c6ded77a04ba40dfb0d19.tar.bz2 |
Add check for recursive trait cycles
This adds a new RAII style TraitQueryGuard so that we can manage the query
lifetime when resolving a trait. This adds in a DefId into a set when we
begin to resolve and then finally removes it when completed. This allows
us to add in a check at the start if this DefId is already within the set
which means this is a trait cycle.
Fixes #1589
Diffstat (limited to 'gcc/rust/backend/rust-compile-expr.h')
0 files changed, 0 insertions, 0 deletions