Skip to content

Commit a4dd079

Browse files
lkolblylukaslueg
authored andcommitted
Add allow(dead_code) to silence warnings.
1 parent aa5362a commit a4dd079

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

example_project/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// The file `built.rs` was placed there by cargo and `build.rs`
2-
pub mod built_info {
2+
mod built_info {
33
include!(concat!(env!("OUT_DIR"), "/built.rs"));
44
}
55

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ macro_rules! write_variable {
226226
($writer:expr, $name:expr, $datatype:expr, $value:expr, $doc:expr) => {
227227
writeln!(
228228
$writer,
229-
"#[doc=\"{}\"]\npub const {}: {} = {};",
229+
"#[doc=\"{}\"]\n#[allow(dead_code)]\npub const {}: {} = {};",
230230
$doc, $name, $datatype, $value
231231
)?;
232232
};

0 commit comments

Comments
 (0)