Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
core::error
,no_std
#304core::error
,no_std
#304Changes from 26 commits
6085f29
c560bcc
ec51e63
f7f6c77
f1d9df3
33b7a36
3663fd1
61b1c17
3e792e0
b278258
8cbdc4e
cc00ef8
7fa183b
28ce40b
0b058bc
e7e9341
bfd7357
706fb6a
a3d073b
89008c0
c9cd3b9
0ef9d1b
7182e3f
515bd36
2614b53
44737a5
e779e1b
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As mentioned in this comment, I feel we should attempt to widen our build compatibility to not break
rustc < 1.81
builds importingthiserror
withdefault-features = false
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of interest, why did we choose this rather than hardcoding
::std
or::core
, in the compiled output (via e.g. an#error_crate
variable)?My slight concern is that use of
::thiserror::__private
may leak this__private
namespace out and could confuse people debugging this. But using::std
/::core
directly it's more obvious what's failing.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MINOR: It may be nice if we gave a better compiler error if a user tried to specify a backtrace when we're not in
std
mode, which could advise the user to enable thestd
feature to use this? I believe the right place for this would be invalid.rs
.... that said, it might actually cause more breakage if people are using
default-features = false
mode and after upgrading they get a compilation error from this "help" because they are actually running instd
mode, just importing this crate incorrectly. So I think I've talked myself out of this.So maybe safer to leave this as-is, and perhaps document that this only works if compiling with
std
available?