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

ices/77320.rs: fixed with errors #485

Merged
merged 1 commit into from
Oct 3, 2020
Merged

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Oct 3, 2020

Issue: rust-lang/rust#77320

const FOO: isize = 10;
const ZST: &() = std::mem::transmute(FOO);
fn main() {
    match &() {
        ZST => 9,
    };
}
=== stdout ===
=== stderr ===
error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
 --> /home/runner/work/glacier/glacier/ices/77320.rs:2:18
  |
2 | const ZST: &() = std::mem::transmute(FOO);
  |                  ^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
  |
  = note: consult the function's documentation for information on how to avoid undefined behavior

error: aborting due to previous error

For more information about this error, try `rustc --explain E0133`.
==============

=== stdout ===
=== stderr ===
error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
 --> /home/runner/work/glacier/glacier/ices/77320.rs:2:18
  |
2 | const ZST: &() = std::mem::transmute(FOO);
  |                  ^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
  |
  = note: consult the function's documentation for information on how to avoid undefined behavior

error: aborting due to previous error

For more information about this error, try `rustc --explain E0133`.
==============
@JohnTitor JohnTitor merged commit e73e3ff into master Oct 3, 2020
@JohnTitor JohnTitor deleted the autofix/ices/77320.rs branch October 3, 2020 13:10
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