-
Notifications
You must be signed in to change notification settings - Fork 60
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
Update Backtrace documentation #208
base: main
Are you sure you want to change the base?
Conversation
I think this is a misunderstanding. The module you edited is the backtrace shim, which provides a newtype wrapper around the backtrace crate. When that module is enabled (via Lines 27 to 41 in 0e18dbd
Lines 94 to 105 in 0e18dbd
Without that specified, the "inert" backtrace type is present: Lines 81 to 92 in 0e18dbd
|
Ah I see, then this might not be the best way to improve the documentation. I found the source file through https://docs.rs/snafu/0.6.2/snafu/struct.Backtrace.html which seems to use the shim for its' source. As that isn't the default feature set, it wasn't clear how I was meant to enable the struct. |
Yes, on docs.rs we enable the backtrace feature by default (among other things) so that the documentation that most users will browse shows more of the features available. |
See also #197. Obviously this is a problem as multiple people have been confused about it, but I'm not sure how to solve the problem. The only thing that comes to mind copy-pasting a paragraph about how Cargo has features and how docs.rs has a different set of features from the default into the docs of every function that makes use of feature flags. Thoughts? |
The features only change the behavior of the |
The guide has the backtraces feature listed as disabled, and it seems the inline documentation fell out of date. Just it case, it'd be a good idea to review similar places in the documentation.
Either that, or find a way to verify it? Maybe a doctest could force the explanation to keep up to date.