File tree Expand file tree Collapse file tree 6 files changed +14
-5
lines changed Expand file tree Collapse file tree 6 files changed +14
-5
lines changed Original file line number Diff line number Diff line change 9393 rustup component add clippy
9494 cargo xtask clippy --warnings-as-errors
9595
96- - name : Run cargo doc
96+ - name : Run cargo doc (without unstable)
9797 run : cargo xtask doc --warnings-as-errors --document-private-items
9898
99+ - name : Run cargo doc (with unstable)
100+ run : cargo xtask doc --warnings-as-errors --document-private-items --unstable
101+
99102 - name : Verify generated code is up-to-date
100103 run : cargo xtask gen-code --check
101104
Original file line number Diff line number Diff line change @@ -29,6 +29,9 @@ use {core::alloc::Allocator, core::ptr::NonNull};
2929/// `unstable`-feature, it uses the `allocator_api` instead. In that case, the function takes an
3030/// additional parameter describing the specific [`Allocator`]. You can use [`alloc::alloc::Global`]
3131/// as default.
32+ ///
33+ /// [`Allocator`]: https://doc.rust-lang.org/alloc/alloc/trait.Allocator.html
34+ /// [`alloc::alloc::Global`]: https://doc.rust-lang.org/alloc/alloc/struct.Global.html
3235pub ( crate ) fn make_boxed <
3336 ' a ,
3437 // The UEFI data structure.
Original file line number Diff line number Diff line change @@ -60,7 +60,8 @@ impl Directory {
6060 } )
6161 }
6262
63- /// Wrapper around [`Self::read_entry_boxed_in`] that uses the [`Global`] allocator.
63+ /// Wrapper around [`Self::read_entry`] that returns an owned copy of the data. It has the same
64+ /// implications and requirements. On failure, the payload of `Err` is `()´.
6465 #[ cfg( feature = "alloc" ) ]
6566 pub fn read_entry_boxed ( & mut self ) -> Result < Option < Box < FileInfo > > > {
6667 let read_entry_res = self . read_entry ( & mut [ ] ) ;
Original file line number Diff line number Diff line change @@ -184,7 +184,7 @@ pub trait File: Sized {
184184 ( self . imp ( ) . flush ) ( self . imp ( ) ) . into ( )
185185 }
186186
187- /// Wrapper around [`Self::get_boxed_info_in`] that uses the [`Global`] allocator .
187+ /// Read the dynamically allocated info for a file .
188188 #[ cfg( feature = "alloc" ) ]
189189 fn get_boxed_info < Info : FileProtocolInfo + ?Sized + Debug > ( & mut self ) -> Result < Box < Info > > {
190190 let fetch_data_fn = |buf| self . get_info :: < Info > ( buf) ;
Original file line number Diff line number Diff line change @@ -94,8 +94,7 @@ fn doc(opt: &DocOpt) -> Result<()> {
9494 open : opt. open ,
9595 document_private_items : opt. document_private_items ,
9696 } ,
97- // for all possible features
98- features : Feature :: more_code ( true , true ) ,
97+ features : Feature :: more_code ( * opt. unstable , true ) ,
9998 packages : Package :: published ( ) ,
10099 release : false ,
101100 target : None ,
Original file line number Diff line number Diff line change @@ -112,6 +112,9 @@ pub struct DocOpt {
112112 #[ clap( long, action) ]
113113 pub document_private_items : bool ,
114114
115+ #[ clap( flatten) ]
116+ pub unstable : UnstableOpt ,
117+
115118 #[ clap( flatten) ]
116119 pub warning : WarningOpt ,
117120}
You can’t perform that action at this time.
0 commit comments