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
I am using stable version Rust 1.68.2 and the thiserror crate, but I am encountering errors related to an unresolved import and the use of an unstable library feature.
I try to activate Backtrace like described in the documentation: latest/thiserror/.
A From impl is generated for each variant containing a #[from] attribute.
Note that the variant must not contain any other fields beyond the source error and possibly a backtrace. > A backtrace is captured from within the From impl if there is a field for it.
let file = struct_db::open_file("my_path").unwrap();
Output logs:
error[E0432]: unresolved import `thiserror`
--> src/error.rs:4:10
|
4 |#[derive(Error, Debug)]| ^^^^^ no `ThiserrorProvide`in`__private`|
= note: this error originates in the derive macro `Error` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0658]: use of unstable library feature 'error_generic_member_access'
--> src/error.rs:4:10
|
4 |#[derive(Error, Debug)]| ^^^^^
|
= note: see issue #99301 <https://github.com/rust-lang/rust/issues/99301> for more information
= note: this error originates in the derive macro `Error` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: `error::Error` doesn't implement `std::fmt::Display` --> src/error.rs:5:10 |5 | pub enum Error { | ^^^^^ `error::Error` cannot be formatted with the default formatter | = help: the trait `std::fmt::Display` is not implemented for `error::Error` = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) insteadnote: required by a bound in `std::error::Error` --> /home/user/.rustup/toolchains/1.68.2-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/error.rs:31:26 |31 | pub trait Error: Debug + Display { | ^^^^^^^ required by this bound in `Error`
Any suggestions on how to resolve this issue would be greatly appreciated.
Related topics that I read to try to resolve this issue:
I am using stable version Rust 1.68.2 and the
thiserror
crate, but I am encountering errors related to an unresolved import and the use of an unstable library feature.I try to activate Backtrace like described in the documentation: latest/thiserror/.
Here's the code I am using with the
thiserror
crate:And my function:
And my test:
Output logs:
Any suggestions on how to resolve this issue would be greatly appreciated.
Related topics that I read to try to resolve this issue:
The text was updated successfully, but these errors were encountered: