Skip to content
Snippets Groups Projects
Commit d2e3115d authored by Gary Guo's avatar Gary Guo Committed by Miguel Ojeda
Browse files

rust: error: `impl Debug` for `Error` with `errname()` integration


Integrate the `Error` type with `errname()` by providing a new
`name()` method.

Then, implement `Debug` for the type using the new method.

[ Miguel: under `CONFIG_SYMBOLIC_ERRNAME=n`, `errname()` is a
  `static inline`, so added a helper to support that case,
  like we had in the `rust` branch. Also moved `#include` up
  and reworded commit message for clarity. ]

Co-developed-by: default avatarWedson Almeida Filho <walmeida@microsoft.com>
Signed-off-by: default avatarWedson Almeida Filho <walmeida@microsoft.com>
Co-developed-by: default avatarSven Van Asbroeck <thesven73@gmail.com>
Signed-off-by: default avatarSven Van Asbroeck <thesven73@gmail.com>
Signed-off-by: default avatarGary Guo <gary@garyguo.net>
Signed-off-by: default avatarAlice Ryhl <aliceryhl@google.com>
Reviewed-by: Martin Rodriguez Reboredo's avatarMartin Rodriguez Reboredo <yakoyoku@gmail.com>
Link: https://lore.kernel.org/r/20230531174450.3733220-1-aliceryhl@google.com


Signed-off-by: default avatarMiguel Ojeda <ojeda@kernel.org>
parent d09a6102
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment