Skip to content

extern declarations without an explicit ABI are deprecated #25

@coolbutuseless

Description

@coolbutuseless

While building I get some warnings about "extern declarations". Adding in the "C" as suggested silenced these warnings.

  • R 4. 5.0
  • rustc 1.87.0 (17067e9ac 2025-05-09) (Homebrew)
   warning: extern declarations without an explicit ABI are deprecated
    --> src/random.rs:4:5
     |
   4 | pub extern fn random_number() -> i32 {
     |     ^^^^^^ help: explicitly specify the "C" ABI: `extern "C"`
     |
     = note: `#[warn(missing_abi)]` on by default
   
   warning: extern declarations without an explicit ABI are deprecated
    --> src/mythreads.rs:5:5
     |
   5 | pub extern fn run_threads() {
     |     ^^^^^^ help: explicitly specify the "C" ABI: `extern "C"`

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