mirror of
https://github.com/salsa-rs/salsa.git
synced 2025-02-02 09:46:06 +00:00
Merge #322
322: re-export from salsa_2022_macros r=nikomatsakis a=nikomatsakis d'oh, why didn't this fail CI? Co-authored-by: Niko Matsakis <niko@alum.mit.edu>
This commit is contained in:
commit
8a06de0610
7 changed files with 16 additions and 18 deletions
4
.github/workflows/test.yml
vendored
4
.github/workflows/test.yml
vendored
|
@ -33,6 +33,10 @@ jobs:
|
|||
toolchain: ${{ matrix.rust }}
|
||||
components: rustfmt, clippy
|
||||
default: true
|
||||
- uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: check
|
||||
args: --all
|
||||
- uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: test
|
||||
|
|
|
@ -345,11 +345,3 @@ impl SalsaField {
|
|||
!self.has_no_eq_attr
|
||||
}
|
||||
}
|
||||
|
||||
/// True if this an attribute that salsa permits users to attach to
|
||||
/// entity/interned fields.
|
||||
fn is_entity_like_field_attribute(a: &syn::Attribute) -> bool {
|
||||
FIELD_OPTION_ATTRIBUTES
|
||||
.iter()
|
||||
.any(|(fa, _)| a.path.is_ident(fa))
|
||||
}
|
||||
|
|
|
@ -370,10 +370,9 @@ fn specify_fn(
|
|||
item_fn: &syn::ItemFn,
|
||||
config_ty: &syn::Type,
|
||||
) -> syn::Result<Option<syn::ImplItemMethod>> {
|
||||
let specify = match &args.specify {
|
||||
Some(s) => s,
|
||||
None => return Ok(None),
|
||||
};
|
||||
if args.specify.is_none() {
|
||||
return Ok(None);
|
||||
}
|
||||
|
||||
// `specify` has the same signature as the original,
|
||||
// but it takes a value arg and has no return type.
|
||||
|
|
|
@ -41,9 +41,9 @@ pub use self::storage::DbWithJar;
|
|||
pub use self::storage::Storage;
|
||||
pub use self::tracked_struct::TrackedStructData;
|
||||
pub use self::tracked_struct::TrackedStructId;
|
||||
pub use salsa_entity_macros::accumulator;
|
||||
pub use salsa_entity_macros::db;
|
||||
pub use salsa_entity_macros::input;
|
||||
pub use salsa_entity_macros::interned;
|
||||
pub use salsa_entity_macros::jar;
|
||||
pub use salsa_entity_macros::tracked;
|
||||
pub use salsa_2022_macros::accumulator;
|
||||
pub use salsa_2022_macros::db;
|
||||
pub use salsa_2022_macros::input;
|
||||
pub use salsa_2022_macros::interned;
|
||||
pub use salsa_2022_macros::jar;
|
||||
pub use salsa_2022_macros::tracked;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
//! Test that a `tracked` fn on a `salsa::input`
|
||||
//! compiles and executes successfully.
|
||||
#![allow(warnings)]
|
||||
|
||||
#[salsa::jar(db = Db)]
|
||||
struct Jar(MyInput, tracked_fn);
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
//! Test that a `tracked` fn on a `salsa::input`
|
||||
//! compiles and executes successfully.
|
||||
#![allow(dead_code)]
|
||||
|
||||
#[salsa::jar(db = Db)]
|
||||
struct Jar(MyInput, MyTracked, tracked_fn);
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
//! Test that a `tracked` fn on a `salsa::input`
|
||||
//! compiles and executes successfully.
|
||||
#![allow(warnings)]
|
||||
|
||||
#[salsa::jar(db = Db)]
|
||||
struct Jar(MyInput, MyTracked, tracked_fn, tracked_fn_extra);
|
||||
|
|
Loading…
Reference in a new issue