This repository has been archived by the owner on Oct 27, 2024. It is now read-only.
forked from salsa-rs/salsa
-
Notifications
You must be signed in to change notification settings - Fork 0
salsa-rs#287 salsa-rs#288 salsa-rs#289 salsa-rs#290 #3
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
crossbeam_utils is currently not used anywhere withing this crate so I propose to remove the dependency to (slightly) reduce compile times
The function is morally an FnOnce, since if called multiple times the function will panic. iuc, the code opted out of the compiler's checks before via a clever `.take()`. Another change is to take the closure by value rather than by reference. The monomorphization seems harmless, since `with_incremented_revision` is only called from two places.
Two examples had a superfluous bound ': salsa::Database' that wasn't present in the `compiler` example. The `query_group` macro adds this bound automatically. This change can lead to a trailing `+` in the bounds list. I verified this is OK by running the examples and verifying that the production is allowed [per the Rust Reference](https://doc.rust-lang.org/reference/trait-bounds.html)
Update the macro for `query_group` so the comment on `fn in_db` no longer says that it is more common to use the trait method on `db`. Afaict, the trait methods referred to were removed when dyn database were introduced in RFC0006: ./book/src/rfcs/RFC0006-Dynamic-Databases.md, as described in the section "Instead of `db.query(Q)`, you write `Q.in_db(&db)`"
287: Remove unused crossbeam_utils dependency r=nikomatsakis a=DSPOM2 crossbeam_utils is currently not used anywhere withing this crate so I propose to remove the dependency to (slightly) reduce compile times Co-authored-by: DSPOM2 <[email protected]>
288: Make with_incremented_revision take FnOnce r=nikomatsakis a=mheiber Removes a bug vector, since this function would panic if the closure is used more than once. iuc, the code opted out of the compiler's checks before via a clever `.take()`. Another change is to take the closure by value rather than by reference. The monomorphization seems harmless, since `with_incremented_revision` is only called from two places. 289: Remove ': salsa::Database' bound from two examples r=nikomatsakis a=mheiber Two examples had a superfluous bound ': salsa::Database' that wasn't present in the `compiler` example and doesn't seem to be needed. The `query_group` macro adds this bound automatically. This change can lead to a trailing `+` in the bounds list. I verified this is OK by running the examples and verifying that the production is allowed [per the Rust Reference](https://doc.rust-lang.org/reference/trait-bounds.html) Co-authored-by: Maxwell Elliot Heiber <[email protected]>
290: Update doc in macro about query.in_db for dyn db r=nikomatsakis a=mheiber Update the macro for `query_group` so the comment on `fn in_db` no longer says that it is more common to use the trait method on `db`. Afaict, the trait methods referred to were removed when dyn database were introduced in RFC0006: ./book/src/rfcs/RFC0006-Dynamic-Databases.md, as described in the section "Instead of `db.query(Q)`, you write `Q.in_db(&db)`" Co-authored-by: Maxwell Elliot Heiber <[email protected]>
This change resolves a fixme that referenced salsa-rs#120. This change breaks no tests, and, if I understand correctly, does not affect user-facing API. Here is the difference for the `HelloWorldGroupStorage__` struct generated from macros in the `hello_world` example: **Before:** ```rs struct HelloWorldGroupStorage__ { pub input_string:std::sync::Arc<<InputStringQuery as salsa::Query> ::Storage> ,pub length:std::sync::Arc<<LengthQuery as salsa::Query> ::Storage> , } ``` **After:** ```rs struct HelloWorldGroupStorage__ { input_string:std::sync::Arc<<InputStringQuery as salsa::Query> ::Storage> ,length:std::sync::Arc<<LengthQuery as salsa::Query> ::Storage> , } ```
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.