We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
mut
This is a really cool macro! I noticed that it doesn't work if we declare mut function args:
use cached::proc_macro::cached; #[cached] fn foo(mut x: i32) -> i32 { x += 1; x }
This gives:
error: expected expression, found keyword `mut` --> src/bin/foo.rs:4:8 | 4 | fn foo(mut x: i32) -> i32 { | ^^^ expected expression
This works:
use cached::proc_macro::cached; #[cached] fn foo(x: i32) -> i32 { let mut x = x; x += 1; x }
It's easy to work around but it feels like a parsing bug that the former doesn't work.
The text was updated successfully, but these errors were encountered:
yeah, I'm going to guess it's this line being naive
cached/cached_proc_macro/src/lib.rs
Line 93 in 4d7dea2
Sorry, something went wrong.
This should be fixed now, released in 0.29.0
0.29.0
cached/tests/cached.rs
Lines 1144 to 1155 in e24d7a7
No branches or pull requests
This is a really cool macro!
I noticed that it doesn't work if we declare
mut
function args:This gives:
This works:
It's easy to work around but it feels like a parsing bug that the former doesn't work.
The text was updated successfully, but these errors were encountered: