mirror of
https://github.com/rtic-rs/rtic.git
synced 2025-12-19 14:25:18 +01:00
implement RFC #212
This commit is contained in:
parent
14d63f4961
commit
9195038c87
25 changed files with 369 additions and 311 deletions
|
|
@ -24,13 +24,17 @@ pub fn codegen(
|
|||
let mut values = vec![];
|
||||
let mut has_cfgs = false;
|
||||
|
||||
for name in resources {
|
||||
for (name, access) in resources {
|
||||
let (res, expr) = app.resource(name).expect("UNREACHABLE");
|
||||
|
||||
let cfgs = &res.cfgs;
|
||||
has_cfgs |= !cfgs.is_empty();
|
||||
|
||||
let mut_ = res.mutability;
|
||||
let mut_ = if access.is_exclusive() {
|
||||
Some(quote!(mut))
|
||||
} else {
|
||||
None
|
||||
};
|
||||
let ty = &res.ty;
|
||||
|
||||
if ctxt.is_init() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue