-
Notifications
You must be signed in to change notification settings - Fork 152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#[tracked]
emitted accumulated
uses non_local_definitions
#607
Comments
Hmm. It makes me grouchy how bad our (meaning Rust's) support is for hygiene. Can you point at what the "non-local definition" is in particular? |
It's for making this test work salsa/tests/accumulate-reuse-workaround.rs Lines 1 to 3 in 254c749
The macros basically create a salsa/components/salsa-macro-rules/src/setup_tracked_fn.rs Lines 229 to 269 in 254c749
|
All so to prevent leaking the |
Ah, I see. Yes, I do want to prevent leaking the |
Meaning rust-analyzer is unable to figure out what
accumulated
is, which is bad if we want to use salsa in our codebase. The trick used here is mainly to get around lack of defsite hygiene, as otherwise a user couldn't create a tracked function namedaccumulated
. Given salsa already forbids certain field names i feel like it would be alright to forbid theaccumulated
function name as well. That simplifies a couple of things for thetracked
macro in general I'd say.The text was updated successfully, but these errors were encountered: