Skip to content

Commit 26ffca2

Browse files
committed
Document the options
1 parent d3de0c4 commit 26ffca2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

compiler/rustc_interface/src/queries.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ use std::sync::Arc;
3030
/// [`take`]: Self::take
3131
/// [`compute`]: Self::compute
3232
pub struct Query<T> {
33+
// The outer option is `None` until the query is computed.
34+
// Then the whole thing becomes `Some(Some(result))`.
35+
// Once the value gets taken/stolen, it is `Some(None)`.
3336
result: RefCell<Option<Option<Result<T>>>>,
3437
}
3538

0 commit comments

Comments
 (0)