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

Evaluate const functions for stable #222

Closed
phil-opp opened this issue Dec 28, 2020 · 0 comments · Fixed by #255
Closed

Evaluate const functions for stable #222

phil-opp opened this issue Dec 28, 2020 · 0 comments · Fixed by #255

Comments

@phil-opp
Copy link
Member

Some const_fn functionality was stabilized, so we might be able to remove the nightly gate on some of our const fns.

josephlr added a commit that referenced this issue May 14, 2021
Fixes #222

The following methods can be made `const` on stable:
  - `GlobalDescriptorTable::from_raw_slice`
  - `MappedFrame::{start_address, size}`
  - `Page<Size4KiB>::p1_index`

The remaining functions still need `const_fn` because:
  - Some GDT methods use `&mut self`
  - The IDT uses function pointers as a type argument
  - The PageSize marker trait is used all over

Comments were updated where appropriate.

Signed-off-by: Joe Richey <[email protected]>
josephlr added a commit that referenced this issue May 14, 2021
Fixes #222

The following methods can be made `const` on stable:
  - `GlobalDescriptorTable::from_raw_slice`
  - `MappedFrame::{start_address, size}`
  - `Page<Size4KiB>::p1_index`

The remaining functions still need `const_fn` because:
  - Some GDT methods use `&mut self`
  - The IDT uses function pointers as a type argument
  - The PageSize marker trait is used all over

Comments were updated where appropriate.

Signed-off-by: Joe Richey <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant