Fix some warnings in no_std builds.
The dbg! macro expands to nothing in no_std mode, so variables that are only used for debugging prompt unused variable warnings. Also, allow unstable_features in no_std builds, since they use feature(alloc), which is an unstable feature.
This commit is contained in:
@@ -1024,9 +1024,9 @@ mod tests {
|
||||
let flags = settings::Flags::new(settings::builder());
|
||||
match verify_function(&func, &flags) {
|
||||
Ok(()) => {}
|
||||
Err(err) => {
|
||||
Err(_err) => {
|
||||
#[cfg(feature = "std")]
|
||||
panic!(err.message);
|
||||
panic!(_err.message);
|
||||
#[cfg(not(feature = "std"))]
|
||||
panic!("function failed to verify");
|
||||
}
|
||||
@@ -1203,9 +1203,9 @@ mod tests {
|
||||
let flags = settings::Flags::new(settings::builder());
|
||||
match verify_function(&func, &flags) {
|
||||
Ok(()) => {}
|
||||
Err(err) => {
|
||||
Err(_err) => {
|
||||
#[cfg(feature = "std")]
|
||||
panic!(err.message);
|
||||
panic!(_err.message);
|
||||
#[cfg(not(feature = "std"))]
|
||||
panic!("function failed to verify");
|
||||
}
|
||||
@@ -1254,9 +1254,9 @@ mod tests {
|
||||
let flags = settings::Flags::new(settings::builder());
|
||||
match verify_function(&func, &flags) {
|
||||
Ok(()) => {}
|
||||
Err(err) => {
|
||||
Err(_err) => {
|
||||
#[cfg(feature = "std")]
|
||||
panic!(err.message);
|
||||
panic!(_err.message);
|
||||
#[cfg(not(feature = "std"))]
|
||||
panic!("function failed to verify");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user