News for hackers. Stuff that matters.
Re:Migrating from Go to Rust by ViewTrick1002 on Sunday May 24, 2026 @07:51PM (#48262196)
How come you get macro expansion errors? Or is it because you write incorrect syntax in the enum error definitions?

The example on the docs page is quite clear:

https://docs.rs/thiserror/latest/thiserror/#example

Including all kinds of errors: Strings, tagged unions and automatically converting from std::io::Error with added context.

That one page document is the entire documentation for the thiserror crate.

Re:Migrating from Go to Rust by throwaway894345 on Sunday May 24, 2026 @10:33PM (#48262910)
It’s been a while, I don’t remember the details, but it wasn’t syntax errors.