Closed
Description
This should compile without warnings (playground):
#![allow(incomplete_features)]
#![feature(inline_const)]
const fn one() -> i32 {
1
}
fn main() {
match 1 {
const { one() } => {}
_ => {}
}
}
Yet it warns:
Compiling playground v0.0.1 (/playground)
warning: function is never used: `one`
--> src/main.rs:4:10
|
4 | const fn one() -> i32 {
| ^^^
|
= note: `#[warn(dead_code)]` on by default
warning: 1 warning emitted
Finished dev [unoptimized + debuginfo] target(s) in 0.80s
Running `target/debug/playground`