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

ices/100114.rs: fixed with errors #1443

Merged
merged 1 commit into from
Oct 8, 2022
Merged

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Oct 8, 2022

Issue: rust-lang/rust#100114

#![allow(warnings)]
#![feature(never_type)]
#![allow(const_err)]

use std::mem::MaybeUninit;

const fn never() -> ! {
    unsafe { MaybeUninit::uninit().assume_init() }
}

const NEVER: ! = never();

fn main() {}
=== stdout ===
=== stderr ===
error[E0080]: evaluation of constant value failed
  --> /home/runner/work/glacier/glacier/ices/100114.rs:8:14
   |
8  |     unsafe { MaybeUninit::uninit().assume_init() }
   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |              |
   |              aborted execution: attempted to instantiate uninhabited type `!`
   |              inside `never` at /home/runner/work/glacier/glacier/ices/100114.rs:8:14
...
11 | const NEVER: ! = never();
   |                  ------- inside `NEVER` at /home/runner/work/glacier/glacier/ices/100114.rs:11:18

error: aborting due to previous error

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

=== stdout ===
=== stderr ===
error[E0080]: evaluation of constant value failed
  --> /home/runner/work/glacier/glacier/ices/100114.rs:8:14
   |
8  |     unsafe { MaybeUninit::uninit().assume_init() }
   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |              |
   |              aborted execution: attempted to instantiate uninhabited type `!`
   |              inside `never` at /home/runner/work/glacier/glacier/ices/100114.rs:8:14
...
11 | const NEVER: ! = never();
   |                  ------- inside `NEVER` at /home/runner/work/glacier/glacier/ices/100114.rs:11:18

error: aborting due to previous error

For more information about this error, try `rustc --explain E0080`.
==============
@JohnTitor JohnTitor merged commit 301fa8f into master Oct 8, 2022
@JohnTitor JohnTitor deleted the autofix/ices/100114.rs branch October 8, 2022 06:30
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