Skip to content

Commit 180a71c

Browse files
committed
Remove inaccurate comment about const_fn
Signed-off-by: Joe Richey <joerichey@google.com>
1 parent 0e1587b commit 180a71c

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

src/addr.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -625,8 +625,7 @@ impl Sub<PhysAddr> for PhysAddr {
625625
///
626626
/// Returns the greatest `x` with alignment `align` so that `x <= addr`.
627627
///
628-
/// Panics if the alignment is not a power of two. Without the `const_fn`
629-
/// feature, the panic message will be "index out of bounds".
628+
/// Panics if the alignment is not a power of two.
630629
#[inline]
631630
pub const fn align_down(addr: u64, align: u64) -> u64 {
632631
assert!(align.is_power_of_two(), "`align` must be a power of two");
@@ -637,8 +636,7 @@ pub const fn align_down(addr: u64, align: u64) -> u64 {
637636
///
638637
/// Returns the smallest `x` with alignment `align` so that `x >= addr`.
639638
///
640-
/// Panics if the alignment is not a power of two. Without the `const_fn`
641-
/// feature, the panic message will be "index out of bounds".
639+
/// Panics if the alignment is not a power of two.
642640
#[inline]
643641
pub const fn align_up(addr: u64, align: u64) -> u64 {
644642
assert!(align.is_power_of_two(), "`align` must be a power of two");

src/structures/gdt.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,7 @@ impl GlobalDescriptorTable {
9696
const_fn! {
9797
/// Adds the given segment descriptor to the GDT, returning the segment selector.
9898
///
99-
/// Panics if the GDT has no free entries left. Without the `const_fn`
100-
/// feature, the panic message will be "index out of bounds".
99+
/// Panics if the GDT has no free entries left.
101100
#[inline]
102101
pub fn add_entry(&mut self, entry: Descriptor) -> SegmentSelector {
103102
let index = match entry {

0 commit comments

Comments
 (0)