Closed as not planned
Description
I have the following code:
fn foo() {}
const fn bar() {}
fn main() {
let _ = foo();
const _: () = bar();
}
Even though both foo
and bar
are used, I get an unused warning for bar
:
warning: function `bar` is never used
--> src/main.rs:2:10
|
2 | const fn bar() {}
| ^^^
|
= note: `#[warn(dead_code)]` on by default
Version
Rust 1.65.0
Metadata
Metadata
Assignees
Labels
No labels