Skip to content
This repository has been archived by the owner on May 23, 2024. It is now read-only.

ices/52334.rs: fixed with no errors #522

Closed
wants to merge 1 commit into from

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#52334

type Foo = extern "C" fn(::std::ffi::CStr);
extern "C" {
    fn meh(blah: Foo);
}

fn main() {
    meh as usize;
}
=== stdout ===
=== stderr ===
warning: `extern` block uses type `CStr`, which is not FFI-safe
 --> /home/runner/work/glacier/glacier/ices/52334.rs:3:18
  |
3 |     fn meh(blah: Foo);
  |                  ^^^ not FFI-safe
  |
  = note: `#[warn(improper_ctypes)]` on by default
  = help: consider adding a `#[repr(C)]` or `#[repr(transparent)]` attribute to this struct
  = note: this struct has unspecified layout

warning: 1 warning emitted

==============

=== stdout ===
=== stderr ===
warning: `extern` block uses type `CStr`, which is not FFI-safe
 --> /home/runner/work/glacier/glacier/ices/52334.rs:3:18
  |
3 |     fn meh(blah: Foo);
  |                  ^^^ not FFI-safe
  |
  = note: `#[warn(improper_ctypes)]` on by default
  = help: consider adding a `#[repr(C)]` or `#[repr(transparent)]` attribute to this struct
  = note: this struct has unspecified layout

warning: 1 warning emitted

==============
@Alexendoo Alexendoo closed this Oct 28, 2020
@Alexendoo Alexendoo deleted the autofix/ices/52334.rs branch October 28, 2020 13:15
@Alexendoo
Copy link
Member

Needed a tweak, not yet fixed: d60e2dd

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

Successfully merging this pull request may close these issues.

2 participants