Skip to content

Commit

Permalink
Rollup merge of rust-lang#67081 - osa1:fix_query_type_docs, r=Dylan-DPC
Browse files Browse the repository at this point in the history
Fix Query type docs

`give` no longer exists, `compute` is used to generate query results now.
  • Loading branch information
JohnTitor authored Dec 6, 2019
2 parents c85284e + 5ddfbc2 commit cc7c45f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/librustc_interface/queries.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use std::mem;
use syntax::{self, ast};

/// Represent the result of a query.
/// This result can be stolen with the `take` method and returned with the `give` method.
/// This result can be stolen with the `take` method and generated with the `compute` method.
pub struct Query<T> {
result: RefCell<Option<Result<T>>>,
}
Expand All @@ -37,7 +37,7 @@ impl<T> Query<T> {
}

/// Takes ownership of the query result. Further attempts to take or peek the query
/// result will panic unless it is returned by calling the `give` method.
/// result will panic unless it is generated by calling the `compute` method.
pub fn take(&self) -> T {
self.result
.borrow_mut()
Expand Down

0 comments on commit cc7c45f

Please sign in to comment.