Merge pull request #175 from matklad/doc-requires

Actually document salsa::requires
This commit is contained in:
Niko Matsakis 2019-06-21 00:12:56 -04:00 committed by GitHub
commit 4084c2c6c2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -46,6 +46,14 @@ mod query_group;
/// ///
/// Here is a list of legal `salsa::XXX` attributes: /// Here is a list of legal `salsa::XXX` attributes:
/// ///
/// - Query group attributes: apply to the trait itself
/// - `#[salsa::requires(OtherGroup)]` -- makes `OtherGroup` a
/// private dependency of the current group. That means that
/// functions that implement queries have `: OutherGropup` bound
/// on the database argument. This is similar to just making `OtherGroup`
/// a super trait, with a difference that users of the query group don't
/// get access to `OtherGroup` automatcally, which would be the case with
/// a super trait.
/// - Storage attributes: control how the query data is stored and set. These /// - Storage attributes: control how the query data is stored and set. These
/// are described in detail in the section below. /// are described in detail in the section below.
/// - `#[salsa::input]` /// - `#[salsa::input]`