Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow compilation on stable Rust #7

Merged
merged 5 commits into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,7 @@ exclude = ["/.gitlab-ci.yml", ".gitignore", ".gitattributes", "/.github/*"]
[dependencies]
aarch64-cpu = { version = "9.3" }
tock-registers = { version = "0.8.x", default-features = false }

[features]
default = ["nightly"]
nightly = []
4 changes: 3 additions & 1 deletion src/instructions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ pub fn halt() {
unsafe { asm!("wfi", options(nomem, nostack)) }
}

mod exceptions {
#[cfg(feature = "nightly")]
#[allow(clippy::missing_safety_doc)]
pub mod exceptions {
use core::arch::asm;

/// Generate an exception targeting EL1, with the specified exception code
Expand Down
3 changes: 1 addition & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
// copied, modified, or distributed except according to those terms.

#![allow(dead_code)]
#![allow(stable_features)]
#![feature(asm_const, core_intrinsics)]
#![cfg_attr(feature = "nightly", feature(asm_const))]
#![no_std]

pub mod instructions;
Expand Down
1 change: 0 additions & 1 deletion src/paging.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use core::convert::{From, Into};
use core::fmt;
use core::ops;

Expand Down
Loading