Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing implementation for u128. #1854

Closed
gxtaillon opened this issue Jan 23, 2022 · 1 comment
Closed

Missing implementation for u128. #1854

gxtaillon opened this issue Jan 23, 2022 · 1 comment

Comments

@gxtaillon
Copy link

Bug Report

Missing implementation for u128.

I'm not familiar with the code base but it looks like an omission since other macros handle it [0], but not here [1], and it's not explicitly mentioned that x128 are not handled here [2]. I also can't find any reports mentioning u128 or i128 at this time except [3] which does not look relevant in regards to tracing these types.

Best,

[0] https://docs.rs/tracing-core/0.1.21/src/tracing_core/field.rs.html#316
[1] https://docs.rs/tracing-core/0.1.21/src/tracing_core/field.rs.html#396
[2] https://docs.rs/tracing/latest/tracing/trait.Value.html
[3] #473

Version

│   │   │   ├── tracing v0.1.29
│   │   │   │   ├── tracing-attributes v0.1.18 (proc-macro)
│   │   │   │   └── tracing-core v0.1.21
│   │   │   └── tracing-futures v0.2.5
│   │   │       └── tracing v0.1.29 (*)
├── tracing v0.1.29 (*)
├── tracing-subscriber v0.3.6
│   ├── tracing v0.1.29 (*)
│   ├── tracing-core v0.1.21 (*)
│   └── tracing-log v0.1.2
│       └── tracing-core v0.1.21 (*)
├── tracing v0.1.29 (*)
└── tracing-subscriber v0.3.6 (*)

Platform

Linux XXXX 5.10.60.1-microsoft-standard-WSL2 #1 SMP Wed Aug 25 23:20:18 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Description

error[E0277]: the trait bound `u128: tracing::Value` is not satisfied
   --> src/x.rs:y:z
    |
240 |         debug!(x, "message");
    |         ^^^^^^^^^^^^^^^^^^^^ the trait `tracing::Value` is not implemented for `u128`
    |
    = note: required for the cast to the object type `dyn tracing::Value`
    = note: this error originates in the macro `$crate::valueset` (in Nightly builds, run with -Z macro-backtrace for more info)

For more information about this error, try `rustc --explain E0277`.
@gxtaillon
Copy link
Author

Just discovered the debugging syntax from here : https://docs.rs/tracing/latest/tracing/#recording-fields
Works for me. Closing 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant