Skip to content
This repository has been archived by the owner on Jun 7, 2023. It is now read-only.

RFC42: no_std update #49

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions text/0042-secret-debug-display.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
# Summary

This RFC introduces two [procedural macros](https://doc.rust-lang.org/reference/procedural-macros.html), `SecretDebug`
and `SecretDisplay`, to derive the traits [Debug](https://doc.rust-lang.org/std/fmt/trait.Debug.html) and
[Display](https://doc.rust-lang.org/std/fmt/trait.Display.html) for secret material types in order to avoid leaking
and `SecretDisplay`, to derive the traits [Debug](https://doc.rust-lang.org/core/fmt/trait.Debug.html) and
[Display](https://doc.rust-lang.org/core/fmt/trait.Display.html) for secret material types in order to avoid leaking
their internals.

# Motivation
Expand Down Expand Up @@ -63,8 +63,8 @@ pub fn derive_secret_debug(input: proc_macro::TokenStream) -> proc_macro::TokenS

let expanded = quote! {
// The generated implementation.
impl #impl_generics std::fmt::Debug for #name #ty_generics {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
impl #impl_generics core::fmt::Debug for #name #ty_generics {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
write!(f, "<Omitted secret>")
}
}
Expand Down