You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Importing ratatui_macros::line causes tracing::info to compile error:
use ratatui_macros::line;use tracing::info;fnmain(){info!("Hello, world!");}
Here's the error:
error: expected a literal
--> src/main.rs:5:5
|
5 | info!("Hello, world!");
| ^^^^^^^^^^^^^^^^^^^^^^
|
= note: only literals (like `"foo"`, `-42` and `3.14`) can be passed to `concat!()`
= note: this error originates in the macro `line` which comes from the expansion of the macro `info` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0308]: mismatched types
--> src/main.rs:5:5
|
5 | info!("Hello, world!");
| ^^^^^^^^^^^^^^^^^^^^^^
| |
| expected `u32`, found `Line<'_>`
| arguments to this enum variant are incorrect
|
tracing seems to be adding a line like this ::core::option::Option::Some(::ratatui::text::Line::default()), when use ratatui_macros::line is in the file. This seems to me like it is a bug with tracing but I wanted to post here first to double check.
The text was updated successfully, but these errors were encountered:
Importing
ratatui_macros::line
causestracing::info
to compile error:Here's the error:
with this
Cargo.toml
I get similar errors with other macros from
tracing
, but I don't get any errors withlog::info!
or other macros fromlog
.Here's the diff of
cargo expand
without and withuse ratatui_macros::line;
tracing
seems to be adding a line like this::core::option::Option::Some(::ratatui::text::Line::default()),
whenuse ratatui_macros::line
is in the file. This seems to me like it is a bug withtracing
but I wanted to post here first to double check.The text was updated successfully, but these errors were encountered: