Skip to content

Commit d1dc966

Browse files
committed
remove deny lints
1 parent b9dd6ad commit d1dc966

File tree

4 files changed

+25
-18
lines changed

4 files changed

+25
-18
lines changed

.github/workflows/ci.yml

+1
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ jobs:
105105
VENDOR: ${{ matrix.vendor }}
106106
OPTIONS: ${{ matrix.options }}
107107
COMMAND: check
108+
RUST_TOOLCHAIN: ${{ matrix.rust }}
108109
run: bash ci/script.sh
109110

110111
ci-clippy:

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
77

88
## [Unreleased]
99

10+
- Remove all deny lints from generated crate
1011
- Add `reexport_core_peripherals` and `reexport_interrupt` features disabled by default
1112
- rename `const-generic` feature to `array_proxy`
1213
- `FieldWriter` takes offset as struct field instead of const generic.

ci/script.sh

+23-4
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,33 @@ main() {
4040

4141
# test crate
4242
cargo init --name foo $td
43-
echo 'cortex-m = "0.7.7"' >> $td/Cargo.toml
43+
echo 'cortex-m = "0.7.7"' >> $td/Cargo.toml
4444
echo 'cortex-m-rt = "0.7.3"' >> $td/Cargo.toml
45-
echo 'vcell = "0.1.3"' >> $td/Cargo.toml
45+
echo 'vcell = "0.1.3"' >> $td/Cargo.toml
4646
if [[ "$options" == *"--atomics"* ]]; then
4747
echo 'portable-atomic = { version = "1.4", default-features = false }' >> $td/Cargo.toml
4848
fi
49-
echo '[profile.dev]' >> $td/Cargo.toml
50-
echo 'incremental = false' >> $td/Cargo.toml
49+
echo '[profile.dev]' >> $td/Cargo.toml
50+
echo 'incremental = false' >> $td/Cargo.toml
51+
52+
echo '[lints.rust]' >> $td/Cargo.toml
53+
echo 'dead_code = "deny"' >> $td/Cargo.toml
54+
echo 'improper_ctypes = "deny"' >> $td/Cargo.toml
55+
echo 'missing_docs = "deny"' >> $td/Cargo.toml
56+
echo 'no_mangle_generic_items = "deny"' >> $td/Cargo.toml
57+
echo 'non_shorthand_field_patterns = "deny"' >> $td/Cargo.toml
58+
echo 'overflowing_literals = "deny"' >> $td/Cargo.toml
59+
echo 'path_statements = "deny"' >> $td/Cargo.toml
60+
echo 'patterns_in_fns_without_body = "deny"' >> $td/Cargo.toml
61+
echo 'unconditional_recursion = "deny"' >> $td/Cargo.toml
62+
echo 'unused_allocation = "deny"' >> $td/Cargo.toml
63+
echo 'unused_comparisons = "deny"' >> $td/Cargo.toml
64+
echo 'unused_parens = "deny"' >> $td/Cargo.toml
65+
echo 'while_true = "deny"' >> $td/Cargo.toml
66+
if [[ "$RUST_TOOLCHAIN" == *"nightly"* ]]; then
67+
echo 'private_bounds = "deny"' >> $td/Cargo.toml
68+
echo 'private_interfaces = "deny"' >> $td/Cargo.toml
69+
fi
5170

5271
case $VENDOR in
5372
Atmel)

src/generate/device.rs

-14
Original file line numberDiff line numberDiff line change
@@ -51,20 +51,6 @@ pub fn render(d: &Device, config: &Config, device_x: &mut String) -> Result<Toke
5151
out.extend(quote! { #![doc = #doc] });
5252
if !config.make_mod {
5353
out.extend(quote! {
54-
// Deny a subset of warnings
55-
#![deny(dead_code)]
56-
#![deny(improper_ctypes)]
57-
#![deny(missing_docs)]
58-
#![deny(no_mangle_generic_items)]
59-
#![deny(non_shorthand_field_patterns)]
60-
#![deny(overflowing_literals)]
61-
#![deny(path_statements)]
62-
#![deny(patterns_in_fns_without_body)]
63-
#![deny(unconditional_recursion)]
64-
#![deny(unused_allocation)]
65-
#![deny(unused_comparisons)]
66-
#![deny(unused_parens)]
67-
#![deny(while_true)]
6854
// Explicitly allow a few warnings that may be verbose
6955
#![allow(non_camel_case_types)]
7056
#![allow(non_snake_case)]

0 commit comments

Comments
 (0)