Skip to content

const_fn weirdness on v0.9.0 #52

@reinvantveer

Description

@reinvantveer

Hi, thank you for sharing all this awesomeness. It's truly amazing.

Since lock_api dropped the const_fn attribute, in v0.4.4 commit Amanieu/parking_lot@aea1350 I'm running into compile trouble using the use_spin_nightly feature. I'm using a custom-built 1.52.0-dev nightly Rust/Cargo and LLVM toolchain with Motorola 68000 family support, which I play around with to program for the Sega Megadrive. It's a blast.

dependency:
linked_list_allocator = { version = "0.9.0", default-features = false, features = ["use_spin_nightly"] }

I get:

error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable
   --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/lock_api-0.4.4/src/rwlock.rs:348:6
    |
348 | impl<R: RawRwLock, T> RwLock<R, T> {
    |      ^
    |
    = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
    = help: add `#![feature(const_fn)]` to the crate attributes to enable

I'm fairly new to this. I haven't done any systems programming before, and some elevator-music equivalent of Rust programming. Any idea on how to get around this? Thanks in advance for any pointers!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions