From a78e85936856c146a30c01711f0e56e20a955145 Mon Sep 17 00:00:00 2001 From: Daniel McCarney Date: Wed, 11 Mar 2026 14:28:08 -0400 Subject: [PATCH] fix rust 1.94 ambiguous panic macro warnings ``` error: `panic` is ambiguous --> src/./alg_tests.rs:699:26 | 699 | unhandled => panic!("extend der2text for tag 0x{unhandled:x?}"), | ^^^^^ ambiguous name | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #147319 = note: ambiguous because of a conflict between a name from a glob import and an outer scope during import or macro resolution ``` --- src/alg_tests.rs | 1 + src/cert.rs | 1 + src/crl/types.rs | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/alg_tests.rs b/src/alg_tests.rs index 0831fcfe..6a81b638 100644 --- a/src/alg_tests.rs +++ b/src/alg_tests.rs @@ -14,6 +14,7 @@ #![allow(clippy::duplicate_mod)] +use std::panic; use std::prelude::v1::*; use base64::{Engine as _, engine::general_purpose}; diff --git a/src/cert.rs b/src/cert.rs index cbf0e63f..c8028018 100644 --- a/src/cert.rs +++ b/src/cert.rs @@ -424,6 +424,7 @@ mod tests { use super::*; #[cfg(feature = "alloc")] use crate::crl::RevocationReason; + use std::panic; use std::prelude::v1::*; #[test] diff --git a/src/crl/types.rs b/src/crl/types.rs index 45890ab1..cb214254 100644 --- a/src/crl/types.rs +++ b/src/crl/types.rs @@ -944,7 +944,7 @@ mod tests { use pki_types::CertificateDer; use std::prelude::v1::*; - use std::println; + use std::{panic, println}; use super::*; use crate::cert::Cert;