Closed
Description
Code
#![feature(never_type)]
fn f(a: !) {}
fn main() {
f(panic!(), 1);
}
Meta
rustc --version --verbose
:
rustc 1.72.0-nightly (a97c36dd2 2023-06-07)
binary: rustc
commit-hash: a97c36dd2e6f711949fc9b790476e93bd9e6d1f4
commit-date: 2023-06-07
host: x86_64-unknown-linux-gnu
release: 1.72.0-nightly
LLVM version: 16.0.5
Error output
warning: unreachable expression
--> g.rs:5:17
|
5 | f(panic!(), 1);
| -------- ^ unreachable expression
| |
| any code following this expression is unreachable
|
= note: `#[warn(unreachable_code)]` on by default
error[E0061]: this function takes 1 argument but 2 arguments were supplied
--> g.rs:5:5
|
5 | f(panic!(), 1);
| ^ - - unexpected argument of type `{integer}`
| |
| help: remove the extra argument
|
note: function defined here
--> g.rs:2:4
|
2 | fn f(a: !) {}
| ^ ----
error: aborting due to previous error; 1 warning emitted
Backtrace
too long
Metadata
Metadata
Assignees
Labels
Area: Messages for errors, warnings, and lintsCategory: This is a bug.Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Relevant to the compiler team, which will review and decide on the PR/issue.This issue requires a build of rustc or tooling with debug-assertions in some way