Merge pull request #566 from betrusted-io/rust-1.80-warns

patches to clean up warnings in rust-1.80
This commit is contained in:
bunnie 2024-08-19 02:30:21 +08:00 committed by GitHub
commit 276c6cf6d5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 17 additions and 4 deletions

View file

@ -40,6 +40,9 @@ armv7 = { git = "https://github.com/Foundation-Devices/armv7.git", branch = "upd
xous-kernel = { package = "xous", version = "0.9.63", features = ["v2p"] }
critical-section = "1.1.1"
[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(ci)', 'cfg(baremetal)'] }
[features]
cramium-soc = ["utralib/cramium-soc", "cramium-hal", "rand_chacha", "raw-trng"]
cramium-fpga = ["utralib/cramium-fpga"]

View file

@ -269,7 +269,7 @@ impl MemoryManager {
owned_bytes
}
#[cfg(all(baremetal, feature = "print-debug"))]
#[cfg(all(baremetal, feature = "debug-print"))]
pub fn print_ownership(&self) {
println!("Ownership ({} bytes in all):", unsafe {
MEMORY_ALLOCATIONS.len() + EXTRA_ALLOCATIONS.len()

View file

@ -75,6 +75,9 @@ optional = true
# git = "https://github.com/betrusted-io/engine25519-as.git"
# rev = "274b82899d28535ac6d4b7869e26eef2039578d5"
[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(ci)', 'cfg(rustdoc)'] }
[features]
nightly = ["subtle/nightly"]
default = ["std", "u32_backend"]

View file

@ -10,6 +10,10 @@ description = "AES library for Xous"
cipher = "0.4.2"
zeroize = { version = "1.6.0", optional = true, default-features = false }
[lints.rust.unexpected_cfgs]
level = "warn"
check-cfg = ["cfg(aes_compact)", "cfg(aes_force_soft)"]
[features]
hazmat = [] # Expose cryptographically hazardous APIs
cramium-soc = []

View file

@ -40,4 +40,5 @@ utralib = { version = "0.1.24", optional = true, default-features = false }
precursor = ["utralib/precursor"]
hosted = ["utralib/hosted"]
renode = ["utralib/renode"]
minimal-testing = []
default = []

View file

@ -1,6 +1,3 @@
#![cfg_attr(baremetal, no_main)]
#![cfg_attr(baremetal, no_std)]
mod api;
use api::*;
mod canvas;

View file

@ -153,5 +153,6 @@ rand-api = []
locktests = [
] # for debugging some specific `std` tests cherry-picked out of the test suite
simple-tls = ["rustls", "webpki-roots"]
clifford-bench = []
nettype = [] # takes a file from a URL and emits it as keystrokes
default = [] # "debugprint"

View file

@ -30,5 +30,8 @@ rand_chacha = "0.3.1"
precursor = ["utralib/precursor"]
hosted = ["utralib/hosted"]
renode = ["utralib/renode"]
urandomtest = []
ringosctest = []
avalanchetest = []
debugprint = []
default = [] # "debugprint"

View file

@ -31,6 +31,7 @@ utralib = { version = "0.1.24", optional = true, default-features = false }
[features]
#atsama5d27 = ["utralib/atsama5d27"]
atsama5d27 = []
# you may want to remove the watchdog feature if you're debugging a crash, as it will force the system to reboot automatically
precursor = ["utralib/precursor", "susres/precursor", "watchdog"]