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

ices/85907.rs: fixed with errors #1133

Merged
merged 1 commit into from
Feb 13, 2022
Merged

ices/85907.rs: fixed with errors #1133

merged 1 commit into from
Feb 13, 2022

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#85907

#![feature(const_panic)]

const fn hey() -> usize {
    panic!(123);
}

fn main() {
    let _: [u8; hey()] = todo!();
}
=== stdout ===
=== stderr ===
error: argument to `panic!()` in a const context must have type `&str`
 --> /home/runner/work/glacier/glacier/ices/85907.rs:4:5
  |
4 |     panic!(123);
  |     ^^^^^^^^^^^
  |
  = note: this error originates in the macro `$crate::panic::panic_2015` (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to previous error

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

=== stdout ===
=== stderr ===
error: argument to `panic!()` in a const context must have type `&str`
 --> /home/runner/work/glacier/glacier/ices/85907.rs:4:5
  |
4 |     panic!(123);
  |     ^^^^^^^^^^^
  |
  = note: this error originates in the macro `$crate::panic::panic_2015` (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to previous error

==============
@Alexendoo Alexendoo merged commit b5cc299 into master Feb 13, 2022
@Alexendoo Alexendoo deleted the autofix/ices/85907.rs branch February 13, 2022 12:21
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