Skip to content

Commit 2df2b97

Browse files
committed
Remove deprecated items
1 parent d9bc78a commit 2df2b97

File tree

6 files changed

+6
-67
lines changed

6 files changed

+6
-67
lines changed

Changelog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
- **Breaking:** Also return flags for `MapperAllSizes::translate()` ([#207](https://github.com/rust-osdev/x86_64/pull/207))
44
- **Breaking:** Restructure the `TranslateResult` type and create separate `Translate` trait ([#211](https://github.com/rust-osdev/x86_64/pull/211))
55
- **Breaking:** Use custom error types instead of `()` ([#199](https://github.com/rust-osdev/x86_64/pull/199))
6+
- **Breaking:** Remove deprecated items
7+
- `UnusedPhysFrame`
8+
- `ExceptionStackFrame`
9+
- `VirtAddr::new_unchecked`
10+
- `interrupts::enable_interrupts_and_hlt`
611
- Relaxe `Sized` requirement for `FrameAllocator` in `Mapper::map_to` ([204](https://github.com/rust-osdev/x86_64/pull/204))
712

813
# 0.12.3 – 2020-10-31

src/addr.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,6 @@ impl VirtAddr {
8585
VirtAddr(((addr << 16) as i64 >> 16) as u64)
8686
}
8787

88-
/// Alias for [`new_truncate`][VirtAddr::new_truncate] for backwards compatibility.
89-
#[inline]
90-
#[deprecated(note = "Use new_truncate or new_unsafe instead")]
91-
pub const fn new_unchecked(addr: u64) -> VirtAddr {
92-
Self::new_truncate(addr)
93-
}
94-
9588
/// Creates a new virtual address, without any checks.
9689
///
9790
/// ## Safety

src/instructions/interrupts.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -139,13 +139,6 @@ pub fn enable_and_hlt() {
139139
}
140140
}
141141

142-
/// Alias for [`enable_and_hlt`][enable_and_hlt] for backwards compatibility.
143-
#[inline]
144-
#[deprecated(note = "Use enable_and_hlt instead")]
145-
pub fn enable_interrupts_and_hlt() {
146-
enable_and_hlt();
147-
}
148-
149142
/// Cause a breakpoint exception by invoking the `int3` instruction.
150143
#[inline]
151144
pub fn int3() {

src/structures/idt.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -706,12 +706,6 @@ impl EntryOptions {
706706
}
707707
}
708708

709-
/// Wrapper type for the exception stack frame pushed by the CPU.
710-
///
711-
/// Identical to [`InterruptStackFrame`].
712-
#[deprecated(note = "This type was renamed to InterruptStackFrame.")]
713-
pub type ExceptionStackFrame = InterruptStackFrame;
714-
715709
/// Wrapper type for the interrupt stack frame pushed by the CPU.
716710
///
717711
/// This type derefs to an [`InterruptStackFrameValue`], which allows reading the actual values.

src/structures/paging/frame_alloc.rs

Lines changed: 1 addition & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
//! Traits for abstracting away frame allocation and deallocation.
22
3-
use crate::structures::paging::{PageSize, PhysFrame, Size4KiB};
4-
use core::ops::{Deref, DerefMut};
3+
use crate::structures::paging::{PageSize, PhysFrame};
54

65
/// A trait for types that can allocate a frame of memory.
76
///
@@ -21,46 +20,3 @@ pub trait FrameDeallocator<S: PageSize> {
2120
/// The caller must ensure that the passed frame is unused.
2221
unsafe fn deallocate_frame(&mut self, frame: PhysFrame<S>);
2322
}
24-
25-
/// Represents a physical frame that is not used for any mapping.
26-
#[deprecated(note = "This wrapper type is no longer used. Use `PhysFrame` instead.")]
27-
#[derive(Debug)]
28-
pub struct UnusedPhysFrame<S: PageSize = Size4KiB>(PhysFrame<S>);
29-
30-
#[allow(deprecated)]
31-
impl<S: PageSize> UnusedPhysFrame<S> {
32-
/// Creates a new UnusedPhysFrame from the given frame.
33-
///
34-
/// ## Safety
35-
///
36-
/// This method is unsafe because the caller must guarantee
37-
/// that the given frame is unused.
38-
#[inline]
39-
pub unsafe fn new(frame: PhysFrame<S>) -> Self {
40-
Self(frame)
41-
}
42-
43-
/// Returns the physical frame as `PhysFrame` type.
44-
#[inline]
45-
pub fn frame(self) -> PhysFrame<S> {
46-
self.0
47-
}
48-
}
49-
50-
#[allow(deprecated)]
51-
impl<S: PageSize> Deref for UnusedPhysFrame<S> {
52-
type Target = PhysFrame<S>;
53-
54-
#[inline]
55-
fn deref(&self) -> &Self::Target {
56-
&self.0
57-
}
58-
}
59-
60-
#[allow(deprecated)]
61-
impl<S: PageSize> DerefMut for UnusedPhysFrame<S> {
62-
#[inline]
63-
fn deref_mut(&mut self) -> &mut Self::Target {
64-
&mut self.0
65-
}
66-
}

src/structures/paging/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
//! Page tables translate virtual memory “pages” to physical memory “frames”.
44
55
pub use self::frame::PhysFrame;
6-
#[allow(deprecated)]
7-
pub use self::frame_alloc::UnusedPhysFrame;
86
pub use self::frame_alloc::{FrameAllocator, FrameDeallocator};
97
#[doc(no_inline)]
108
pub use self::mapper::MappedPageTable;

0 commit comments

Comments
 (0)