@@ -29,28 +29,31 @@ pub fn render(d: &Device, config: &Config, device_x: &mut String) -> Result<Toke
2929 }
3030 } ;
3131
32- let doc = format ! (
33- "Peripheral access API for {0} microcontrollers \
34- (generated using svd2rust v{1}{commit_info})\n \n \
35- You can find an overview of the generated API [here].\n \n \
36- API features to be included in the [next] svd2rust \
37- release can be generated by cloning the svd2rust [repository], \
38- checking out the above commit, and running `cargo doc --open`.\n \n \
39- [here]: https://docs.rs/svd2rust/{1}/svd2rust/#peripheral-api\n \
40- [next]: https://github.com/rust-embedded/svd2rust/blob/master/CHANGELOG.md#unreleased\n \
41- [repository]: https://github.com/rust-embedded/svd2rust",
42- d. name. to_uppercase( ) ,
43- env!( "CARGO_PKG_VERSION" ) ,
44- ) ;
45-
4632 if config. target == Target :: Msp430 {
4733 out. extend ( quote ! {
4834 #![ feature( abi_msp430_interrupt) ]
4935 } ) ;
5036 }
5137
52- out. extend ( quote ! { #![ doc = #doc] } ) ;
53- if !config. make_mod {
38+ if !config. skip_crate_attributes {
39+ let doc = format ! (
40+ "Peripheral access API for {0} microcontrollers \
41+ (generated using svd2rust v{1}{commit_info})\n \n \
42+ You can find an overview of the generated API [here].\n \n \
43+ API features to be included in the [next] svd2rust \
44+ release can be generated by cloning the svd2rust [repository], \
45+ checking out the above commit, and running `cargo doc --open`.\n \n \
46+ [here]: https://docs.rs/svd2rust/{1}/svd2rust/#peripheral-api\n \
47+ [next]: https://github.com/rust-embedded/svd2rust/blob/master/CHANGELOG.md#unreleased\n \
48+ [repository]: https://github.com/rust-embedded/svd2rust",
49+ d. name. to_uppercase( ) ,
50+ env!( "CARGO_PKG_VERSION" ) ,
51+ ) ;
52+
53+ out. extend ( quote ! { #![ doc = #doc] } ) ;
54+ }
55+
56+ if !config. make_mod && !config. skip_crate_attributes {
5457 out. extend ( quote ! {
5558 // Explicitly allow a few warnings that may be verbose
5659 #![ allow( non_camel_case_types) ]
0 commit comments