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
507: Emit code to bring generic module into scope when using `-g` option. r=adamgreig a=cr1901
The -g option emits a separate file called generic.rs to split the generic code from the peripherals.
Right now the -g option requires a user to manually add something like the following lines to `lib.rs`:
```rust
use generic::*;
pub mod generic;
```
Otherwise compilation will fail with errors like the following:
```sh
error[E0433]: failed to resolve: maybe a missing crate `FieldReader`?
--> src\port_1_2\p2ifg.rs:111:25
|
111 | P2IFG2_R(crate::FieldReader::new(bits))
| ^^^^^^^^^^^ maybe a missing crate `FieldReader`?
```
This patch automates adding the above code.
Co-authored-by: William D. Jones <[email protected]>
0 commit comments