Summary
basically the title
Lint Name
missing_const_for_fn
Reproducer
I tried this code: (minimal reproducer)
#[warn(clippy::missing_const_for_fn)]
pub fn is_one_byte(s: &str) -> bool {
let [_] = s.as_bytes() else { return false };
true
}
I expected to see this happen: clippy would emit the warning
Instead, this happened: clippy did not warn about it
Version
rustc 1.96.0 (ac68faa20 2026-05-25)
binary: rustc
commit-hash: ac68faa20c58cbccd01ee7208bf3b6e93a7d7f96
commit-date: 2026-05-25
host: x86_64-unknown-linux-gnu
release: 1.96.0
LLVM version: 22.1.2
Summary
basically the title
Lint Name
missing_const_for_fn
Reproducer
I tried this code: (minimal reproducer)
I expected to see this happen: clippy would emit the warning
Instead, this happened: clippy did not warn about it
Version