Skip to content

Commit

Permalink
rust: kernel: use feature individually
Browse files Browse the repository at this point in the history
`rustfmt` (in its default config, at least) does not add a comma
in the last feature of the list, which means diffs are bigger at times.

In addition, this is how the standard library does it, and one
may argue it allows for easier `grep`ing too.

Link: Rust-for-Linux#439 (comment).

Indirectly-suggested-by: Benoit de Chezelles <[email protected]>
Signed-off-by: Miguel Ojeda <[email protected]>
  • Loading branch information
ojeda committed Jan 20, 2022
1 parent 499f1a0 commit 864d8af
Showing 1 changed file with 16 additions and 18 deletions.
34 changes: 16 additions & 18 deletions rust/kernel/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,22 @@
//! do so first instead of bypassing this crate.

#![no_std]
#![feature(
allocator_api,
associated_type_defaults,
concat_idents,
const_fn_trait_bound,
const_mut_refs,
const_ptr_offset_from,
const_refs_to_cell,
const_trait_impl,
doc_cfg,
generic_associated_types,
maybe_uninit_extra,
ptr_metadata,
receiver_trait,
coerce_unsized,
dispatch_from_dyn,
unsize
)]
#![feature(allocator_api)]
#![feature(associated_type_defaults)]
#![feature(concat_idents)]
#![feature(const_fn_trait_bound)]
#![feature(const_mut_refs)]
#![feature(const_ptr_offset_from)]
#![feature(const_refs_to_cell)]
#![feature(const_trait_impl)]
#![feature(doc_cfg)]
#![feature(generic_associated_types)]
#![feature(maybe_uninit_extra)]
#![feature(ptr_metadata)]
#![feature(receiver_trait)]
#![feature(coerce_unsized)]
#![feature(dispatch_from_dyn)]
#![feature(unsize)]

// Ensure conditional compilation based on the kernel configuration works;
// otherwise we may silently break things like initcall handling.
Expand Down

0 comments on commit 864d8af

Please sign in to comment.