-
-
Notifications
You must be signed in to change notification settings - Fork 203
core::error, no_std
#304
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
Closed
Closed
core::error, no_std
#304
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
6085f29
support no_std with error-in-core
jordens c560bcc
exlude compiletest from no_std, fix no_std doctest
jordens ec51e63
undo Error->MyError renames
jordens f7f6c77
use __private namespace
jordens f1d9df3
add comment
jordens 33b7a36
Merge branch 'master' into no-std
jordens 3663fd1
use explicit doc(test(attr))
jordens 61b1c17
error_in_core is stable
jordens 3e792e0
{std -> core}:error: update docs/comment
jordens b278258
docs.rs: std is default
jordens 8cbdc4e
bump MSRV to 1.81
jordens cc00ef8
Merge remote-tracking branch 'upstream/master' into no-std
jordens 7fa183b
Revert "bump MSRV to 1.81"
jordens 28ce40b
Revert "{std -> core}:error: update docs/comment"
jordens 0b058bc
Revert "error_in_core is stable"
jordens e7e9341
minimalize changes, maintain MSRV for `std`
jordens bfd7357
test 1.81 and no_std
jordens 706fb6a
ci no_std: not check but test, 1.81 not necessary
jordens a3d073b
compiletest: allow unused_attributes
jordens 89008c0
prefer required-features
jordens c9cd3b9
compiletest doesn't need std
jordens 0ef9d1b
impl hygiene: fully qualify all paths
jordens 7182e3f
test_no_std: add strictly no_std test
jordens 515bd36
test_{transparent,_lints}: also work with no-std lib
jordens 2614b53
test_no_std: reduce
jordens 44737a5
test_no_std: can't compile on old rust
jordens e779e1b
Merge remote-tracking branch 'upstream/master' into no-std
jordens File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Revert "error_in_core is stable"
This reverts commit 61b1c17.
- Loading branch information
commit 0b058bcb5e54646b38ce1db7d8c1f0c09eec2118
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| use core::error::Error; | ||
| use crate::__private::error::Error; | ||
| use core::panic::UnwindSafe; | ||
|
|
||
| #[doc(hidden)] | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| #![cfg_attr(not(feature = "std"), feature(error_in_core))] | ||
| #![allow(dead_code)] | ||
|
|
||
| use core::fmt::{self, Display}; | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Uh oh!
There was an error while loading. Please reload this page.
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
::stdor::core, in the compiled output (via e.g. an#error_cratevariable)?My slight concern is that use of
::thiserror::__privatemay leak this__privatenamespace out and could confuse people debugging this. But using::std/::coredirectly it's more obvious what's failing.