381: fix typos r=nikomatsakis a=Aadamandersson



Co-authored-by: Adam Andersson <adam.m.andersson@gmail.com>
This commit is contained in:
bors[bot] 2022-08-25 10:34:44 +00:00 committed by GitHub
commit 5c63715a95
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 11 additions and 11 deletions

View file

@ -17,7 +17,7 @@ Then open a PR with a subject line that starts with "RFC:".
## RFC vs Implementation ## RFC vs Implementation
The RFC can be in its own PR, or it can also includ work on the implementation The RFC can be in its own PR, or it can also include work on the implementation
together, whatever works best for you. together, whatever works best for you.
## Does my change need an RFC? ## Does my change need an RFC?

View file

@ -40,7 +40,7 @@ See:
## Cancellation ## Cancellation
Queries that are no longer needed due to concurrent writes or changes in dependencies are cancelled Queries that are no longer needed due to concurrent writes or changes in dependencies are cancelled
by Salsa. Each accesss of an intermediate query is a potential cancellation point. cancellation is by Salsa. Each access of an intermediate query is a potential cancellation point. Cancellation is
implemented via panicking, and Salsa internals are intended to be panic-safe. implemented via panicking, and Salsa internals are intended to be panic-safe.
If you have a query that contains a long loop which does not execute any intermediate queries, If you have a query that contains a long loop which does not execute any intermediate queries,

View file

@ -27,7 +27,7 @@ In addition to the struct itself, we must add an impl of `salsa::Database`:
{{#include ../../../calc-example/calc/src/db.rs:db_impl}} {{#include ../../../calc-example/calc/src/db.rs:db_impl}}
``` ```
## Impementing the `salsa::ParallelDatabase` trait ## Implementing the `salsa::ParallelDatabase` trait
If you want to permit accessing your database from multiple threads at once, then you also need to implement the `ParallelDatabase` trait: If you want to permit accessing your database from multiple threads at once, then you also need to implement the `ParallelDatabase` trait:

View file

@ -28,7 +28,7 @@ fn tracked_fn(args: Args, item_fn: syn::ItemFn) -> syn::Result<TokenStream> {
if requires_interning(&item_fn) { if requires_interning(&item_fn) {
return Err(syn::Error::new( return Err(syn::Error::new(
s.span(), s.span(),
"tracked functon takes too many argments to have its value set with `specify`", "tracked function takes too many arguments to have its value set with `specify`",
)); ));
} }
@ -606,7 +606,7 @@ fn accumulated_fn(
/// * the name of the database argument /// * the name of the database argument
/// * the name(s) of the key arguments /// * the name(s) of the key arguments
fn fn_args(item_fn: &syn::ItemFn) -> syn::Result<(proc_macro2::Ident, Vec<proc_macro2::Ident>)> { fn fn_args(item_fn: &syn::ItemFn) -> syn::Result<(proc_macro2::Ident, Vec<proc_macro2::Ident>)> {
// Check that we have no receiver and that all argments have names // Check that we have no receiver and that all arguments have names
if item_fn.sig.inputs.is_empty() { if item_fn.sig.inputs.is_empty() {
return Err(syn::Error::new( return Err(syn::Error::new(
item_fn.sig.span(), item_fn.sig.span(),

View file

@ -84,7 +84,7 @@ pub trait Configuration {
type SalsaStruct: for<'db> SalsaStructInDb<DynDb<'db, Self>>; type SalsaStruct: for<'db> SalsaStructInDb<DynDb<'db, Self>>;
/// What key is used to index the memo. Typically a salsa struct id, /// What key is used to index the memo. Typically a salsa struct id,
/// but if this memoized function has multiple argments it will be a `salsa::Id` /// but if this memoized function has multiple arguments it will be a `salsa::Id`
/// that results from interning those arguments. /// that results from interning those arguments.
type Key: AsId; type Key: AsId;

View file

@ -81,7 +81,7 @@ where
/// Specify the value for `key` but do not record it is an output. /// Specify the value for `key` but do not record it is an output.
/// This is used for the value fields declared on a tracked struct. /// This is used for the value fields declared on a tracked struct.
/// They are different from other calls to specify beacuse we KNOW they will be given a value by construction, /// They are different from other calls to specify because we KNOW they will be given a value by construction,
/// so recording them as an explicit output (and checking them for validity, etc) is pure overhead. /// so recording them as an explicit output (and checking them for validity, etc) is pure overhead.
pub fn specify_field<'db>(&self, db: &'db DynDb<'db, C>, key: C::Key, value: C::Value) pub fn specify_field<'db>(&self, db: &'db DynDb<'db, C>, key: C::Key, value: C::Value)
where where

View file

@ -161,7 +161,7 @@ impl Runtime {
/// entity table with the index `entity_index`. Has the following effects: /// entity table with the index `entity_index`. Has the following effects:
/// ///
/// * Add a query read on `DatabaseKeyIndex::for_table(entity_index)` /// * Add a query read on `DatabaseKeyIndex::for_table(entity_index)`
/// * Indentify a unique disambiguator for the hash within the current query, /// * Identify a unique disambiguator for the hash within the current query,
/// adding the hash to the current query's disambiguator table. /// adding the hash to the current query's disambiguator table.
/// * Return that hash + id of the current query. /// * Return that hash + id of the current query.
pub(crate) fn disambiguate_entity( pub(crate) fn disambiguate_entity(

View file

@ -140,7 +140,7 @@ where
return; return;
} }
// Otherwise, wait until some other storage entites have dropped. // Otherwise, wait until some other storage entities have dropped.
// We create a mutex here because the cvar api requires it, but we // We create a mutex here because the cvar api requires it, but we
// don't really need one as the data being protected is actually // don't really need one as the data being protected is actually
// the jars above. // the jars above.

View file

@ -463,12 +463,12 @@ pub trait Query: Debug + Default + Sized + for<'d> QueryDb<'d> {
/// Name of the query method (e.g., `foo`) /// Name of the query method (e.g., `foo`)
const QUERY_NAME: &'static str; const QUERY_NAME: &'static str;
/// Extact storage for this query from the storage for its group. /// Exact storage for this query from the storage for its group.
fn query_storage<'a>( fn query_storage<'a>(
group_storage: &'a <Self as QueryDb<'_>>::GroupStorage, group_storage: &'a <Self as QueryDb<'_>>::GroupStorage,
) -> &'a Arc<Self::Storage>; ) -> &'a Arc<Self::Storage>;
/// Extact storage for this query from the storage for its group. /// Exact storage for this query from the storage for its group.
fn query_storage_mut<'a>( fn query_storage_mut<'a>(
group_storage: &'a <Self as QueryDb<'_>>::GroupStorage, group_storage: &'a <Self as QueryDb<'_>>::GroupStorage,
) -> &'a Arc<Self::Storage>; ) -> &'a Arc<Self::Storage>;