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

Do not use type aliases as sorts #5

Merged
merged 1 commit into from
Nov 9, 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
3 changes: 1 addition & 2 deletions flux_support/src/flux_ptr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,8 @@ impl PartialOrd for FluxPtr {
}
}

#[flux_rs::alias(type FluxPtrU8[n: int] = FluxPtr[n])]
pub type FluxPtrU8 = FluxPtr;
#[flux_rs::alias(type FluxPtrU8Mut[n: int] = FluxPtr[n])]

pub type FluxPtrU8Mut = FluxPtr;

pub trait FluxPtrExt {
Expand Down
2 changes: 1 addition & 1 deletion kernel/src/process_standard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ struct ProcessBreaks {
}

/// A type for userspace processes in Tock.
#[flux_rs::refined_by(mem_start: FluxPtrU8Mut, mem_len: int)]
#[flux_rs::refined_by(mem_start: FluxPtr, mem_len: int)]
#[flux_rs::invariant(mem_start + mem_len <= usize::MAX)] // mem doesn't overflow address space
pub struct ProcessStandard<'a, C: 'static + Chip> {
/// Identifier of this process and the index of the process in the process
Expand Down
Loading