File tree Expand file tree Collapse file tree 5 files changed +17
-4
lines changed Expand file tree Collapse file tree 5 files changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,8 @@ required-features = ["builder"]
35
35
default = [" builder" ]
36
36
alloc = []
37
37
builder = [" alloc" ]
38
+ # Nightly-only features, which will eventually be stabilized.
39
+ unstable = []
38
40
39
41
[dependencies ]
40
42
# used for MBI tags
Original file line number Diff line number Diff line change 3
3
## Unreleased
4
4
- MSRV is 1.56.1
5
5
- renamed the ` std ` feature to ` alloc `
6
+ - added the optional ` unstable ` feature (requires nightly)
7
+ - implement ` core::error::Error ` for ` LoadError `
6
8
7
9
## v0.2.0 (2022-05-03)
8
10
- ** BREAKING** renamed ` EntryHeaderTag ` to ` EntryAddressHeaderTag `
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ use crate::{
5
5
RelocatableHeaderTag ,
6
6
} ;
7
7
use core:: convert:: TryInto ;
8
- use core:: fmt:: { Debug , Formatter } ;
8
+ use core:: fmt:: { Debug , Display , Formatter } ;
9
9
use core:: mem:: size_of;
10
10
11
11
/// Magic value for a [`Multiboot2Header`], as defined in spec.
@@ -212,6 +212,15 @@ pub enum LoadError {
212
212
TooSmall ,
213
213
}
214
214
215
+ impl Display for LoadError {
216
+ fn fmt ( & self , f : & mut Formatter < ' _ > ) -> core:: fmt:: Result {
217
+ write ! ( f, "{:?}" , self )
218
+ }
219
+ }
220
+
221
+ #[ cfg( feature = "unstable" ) ]
222
+ impl core:: error:: Error for LoadError { }
223
+
215
224
/// **Use this only if you know what you do. You probably want to use
216
225
/// [`Multiboot2Header`] instead.**
217
226
///
Original file line number Diff line number Diff line change 34
34
//! The MSRV is 1.56.1 stable.
35
35
36
36
#![ no_std]
37
+ #![ cfg_attr( feature = "unstable" , feature( error_in_core) ) ]
37
38
#![ deny( rustdoc:: all) ]
38
39
#![ deny( clippy:: all) ]
39
40
#![ deny( clippy:: missing_const_for_fn) ]
@@ -77,6 +78,5 @@ pub use self::relocatable::*;
77
78
pub use self :: tags:: * ;
78
79
pub use self :: uefi_bs:: * ;
79
80
80
- /// Re-export of [`multiboot2::TagType`] from `multiboot2`-crate as `MbiTagType`, i.e. tags that
81
- /// describe the entries in the Multiboot2 Information Structure (MBI).
81
+ /// Re-export of [`multiboot2::TagType`] from `multiboot2`-crate.
82
82
pub use multiboot2:: TagType as MbiTagType ;
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ documentation = "https://docs.rs/multiboot2"
36
36
default = [" builder" ]
37
37
alloc = []
38
38
builder = [" alloc" ]
39
- # Nightly-only features that will eventually be stabilized.
39
+ # Nightly-only features, which will eventually be stabilized.
40
40
unstable = []
41
41
42
42
[dependencies ]
You can’t perform that action at this time.
0 commit comments