Skip to content

Commit b5f0c82

Browse files
committed
Add note to Thir struct about necessity of Clone derive
1 parent fb3aa33 commit b5f0c82

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

compiler/rustc_middle/src/thir.rs

+3
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ macro_rules! thir_with_elements {
4949
}
5050
)*
5151

52+
// Note: Making `Thir` implement `Clone` is useful for external tools that need access to
53+
// THIR bodies even after the `Steal` query result has been stolen.
54+
// One such tool is https://github.com/rust-corpus/qrates/.
5255
/// A container for a THIR body.
5356
///
5457
/// This can be indexed directly by any THIR index (e.g. [`ExprId`]).

0 commit comments

Comments
 (0)