You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fails to compile because the first quote takes ownership of the &mut ExtCtxt:
macro_crate_test.rs:41:5: 41:25 error: use of moved value: `cx`
macro_crate_test.rs:40:5: 40:25 note: `cx` moved here because it has type `&mut syntax::ext::base::ExtCtxt<'_>`, which is moved by default (use `ref` to override)
The solution is always (?) to re-borrow the ExtCtxt like so:
Code like
fails to compile because the first quote takes ownership of the
&mut ExtCtxt
:The solution is always (?) to re-borrow the
ExtCtxt
like so:The quote macros should do this automatically, for consistency with ordinary Rust functions and to reduce boilerplate.
The text was updated successfully, but these errors were encountered: