This repository was archived by the owner on Jul 6, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 99
This repository was archived by the owner on Jul 6, 2019. It is now read-only.
ioreg macro breaks with "wo" field. #139
Copy link
Copy link
Closed
Description
Attemtping to use wo in the following case:
ioregs!(WDOG = {
0x0 => reg16 stctrlh
{
0 => en,
4 => allowupdate
},
0xc => reg16 refresh {
0..15 => refresh
/* breaks the macro too
{
0xa602 => Seq1,
0xb480 => Seq2,
}*/,
},
0xe => reg16 unlock {
0..15 => unlock: wo, /* the issue is about this */
/*breaks the macro too
{
0xc520 => Seq1,
0xd928 => Seq2,
}*/,
},
})
results in:
[futex:zinc]$ make
rake PLATFORM=k20 build_all
rustc --opt-level 2 -Z no-landing-pads --cfg mcu_k20 --cfg arch_cortex_m4 --target thumbv7em-linux-eabi -Ctarget-cpu=cortex-m4 -C relocation_model=static -Z lto --emit obj -L /home/dpc/lab/rust/zinc/build -o /home/dpc/lab/rust/zinc/build/intermediate/blink_k20/app_blink_k20.o /home/dpc/lab/rust/zinc/apps/app_blink_k20.rs
<quote expansion>:1:1: 1:18 error: use of undeclared type name `WDOG_unlock_Get`
<quote expansion>:1 name_290,ctxt_0
^~~~~~~~~~~~~~~~~
/home/dpc/lab/rust/zinc/apps/app_blink_k20.rs:1:1: 147:1 note: in expansion of ioregs!
/home/dpc/lab/rust/zinc/apps/app_blink_k20.rs:37:5: 62:7 note: expansion site
<quote expansion>:1:1: 62:7 error: failed to resolve. Use of undeclared module `WDOG_unlock_Get`
<quote expansion>:1 name_290,ctxt_0
error: internal compiler error: unexpected failure
note: the compiler hit an unexpected failure path. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
task 'rustc' failed at 'index out of bounds: the len is 1 but the index is 1', /home/dpc/opt/src/rust/src/libsyntax/lib.rs:1
Metadata
Metadata
Assignees
Labels
No labels