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

ices/104685.rs: fixed with no errors #1692

Merged
merged 1 commit into from
Oct 17, 2023
Merged

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#104685

#![feature(extern_types)]

extern "C" {
    pub type ExternType;
}

extern "C" {
    pub static EXTERN: ExternType;
}

pub static EMPTY: () = unsafe {
    &EXTERN;
};

fn main() {}
=== stdout ===
=== stderr ===
warning: unused borrow that must be used
  --> /home/runner/work/glacier/glacier/ices/104685.rs:12:5
   |
12 |     &EXTERN;
   |     ^^^^^^^ the borrow produces a value
   |
   = note: `#[warn(unused_must_use)]` on by default
help: use `let _ = ...` to ignore the resulting value
   |
12 |     let _ = &EXTERN;
   |     +++++++

warning: 1 warning emitted

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

=== stdout ===
=== stderr ===
warning: unused borrow that must be used
  --> /home/runner/work/glacier/glacier/ices/104685.rs:12:5
   |
12 |     &EXTERN;
   |     ^^^^^^^ the borrow produces a value
   |
   = note: `#[warn(unused_must_use)]` on by default
help: use `let _ = ...` to ignore the resulting value
   |
12 |     let _ = &EXTERN;
   |     +++++++

warning: 1 warning emitted

==============
@JohnTitor JohnTitor merged commit 716fb26 into master Oct 17, 2023
@JohnTitor JohnTitor deleted the autofix/ices/104685.rs branch October 17, 2023 15:12
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