Skip to content
This repository was archived by the owner on Nov 7, 2022. It is now read-only.

Nightly feature? #39

Closed
andre-richter opened this issue May 20, 2022 · 5 comments
Closed

Nightly feature? #39

andre-richter opened this issue May 20, 2022 · 5 comments

Comments

@andre-richter
Copy link
Member

CC @AGSaidi since this is blocking the release of #38.

Hi @qwandor,

I am in the process of doing a new release (to make #38 public). However, I have a question regarding your PR #37.
When I build with with stable Rust using

cargo build --target aarch64-unknown-none-softfloat --no-default-features

it errors out on the the core intrinsics use in asm.rs:

error[E0658]: use of unstable library feature 'core_intrinsics': intrinsics are unlikely to ever be stabilized, instead they should be used through stabilized interfaces in the rest of the standard library
  --> src/asm.rs:96:9
   |
96 |         core::intrinsics::unreachable()
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: add `#![feature(core_intrinsics)]` to the crate attributes to enable

error[E0658]: use of unstable library feature 'core_intrinsics': intrinsics are unlikely to ever be stabilized, instead they should be used through stabilized interfaces in the rest of the standard library
   --> src/asm.rs:111:9
    |
111 |         core::intrinsics::unreachable()
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: add `#![feature(core_intrinsics)]` to the crate attributes to enable

For more information about this error, try `rustc --explain E0658`.
error: could not compile `cortex-a` due to 2 previous errors

Did you not stumble over these back then, or am I doing something wrong?

@qwandor
Copy link
Contributor

qwandor commented May 20, 2022

I don't remember having an issue with that, but I'll have a look on Monday.

@andre-richter
Copy link
Member Author

I have guarded the functions for now as well (c5964a2). Could be worth a thought to only guard the unreachable. We can do this in a follow up release if there is demand.

@qwandor
Copy link
Contributor

qwandor commented May 24, 2022

Well I can reproduce the issue, so I'm not sure how I missed it before.

Would it be possible to use core::unreachable rather than core::intrinsics::unreachable? Or core::hint::unreachable_unchecked if you prefer.

@andre-richter
Copy link
Member Author

Since we already have an unsafe block open, let’s go with the unchecked. Can you post a PR?

I can publish it as a patch release tonight.

@andre-richter
Copy link
Member Author

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants