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

ices/87496.rs: fixed with no errors #970

Merged
merged 1 commit into from
Sep 18, 2021
Merged

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#87496

#[repr(transparent)]
struct TransparentCustomZst(());
extern "C" {
    fn good17(p: TransparentCustomZst);
}

fn main() {}
=== stdout ===
=== stderr ===
warning: struct is never constructed: `TransparentCustomZst`
 --> /home/runner/work/glacier/glacier/ices/87496.rs:2:8
  |
2 | struct TransparentCustomZst(());
  |        ^^^^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(dead_code)]` on by default

warning: function is never used: `good17`
 --> /home/runner/work/glacier/glacier/ices/87496.rs:4:5
  |
4 |     fn good17(p: TransparentCustomZst);
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: `extern` block uses type `TransparentCustomZst`, which is not FFI-safe
 --> /home/runner/work/glacier/glacier/ices/87496.rs:4:18
  |
4 |     fn good17(p: TransparentCustomZst);
  |                  ^^^^^^^^^^^^^^^^^^^^ not FFI-safe
  |
  = note: `#[warn(improper_ctypes)]` on by default
  = note: this struct contains only zero-sized fields
note: the type is defined here
 --> /home/runner/work/glacier/glacier/ices/87496.rs:2:1
  |
2 | struct TransparentCustomZst(());
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: 3 warnings emitted

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

=== stdout ===
=== stderr ===
warning: struct is never constructed: `TransparentCustomZst`
 --> /home/runner/work/glacier/glacier/ices/87496.rs:2:8
  |
2 | struct TransparentCustomZst(());
  |        ^^^^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(dead_code)]` on by default

warning: function is never used: `good17`
 --> /home/runner/work/glacier/glacier/ices/87496.rs:4:5
  |
4 |     fn good17(p: TransparentCustomZst);
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: `extern` block uses type `TransparentCustomZst`, which is not FFI-safe
 --> /home/runner/work/glacier/glacier/ices/87496.rs:4:18
  |
4 |     fn good17(p: TransparentCustomZst);
  |                  ^^^^^^^^^^^^^^^^^^^^ not FFI-safe
  |
  = note: `#[warn(improper_ctypes)]` on by default
  = note: this struct contains only zero-sized fields
note: the type is defined here
 --> /home/runner/work/glacier/glacier/ices/87496.rs:2:1
  |
2 | struct TransparentCustomZst(());
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: 3 warnings emitted

==============
@Alexendoo Alexendoo merged commit 7a58800 into master Sep 18, 2021
@Alexendoo Alexendoo deleted the autofix/ices/87496.rs branch September 18, 2021 12:16
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