error: this could be a `const fn` --> $DIR/could_be_const.rs:14:5 | LL | / pub fn new() -> Self { LL | | Self { guess: 42 } LL | | } | |_____^ | = note: `-D clippy::missing-const-for-fn` implied by `-D warnings` error: this could be a `const fn` --> $DIR/could_be_const.rs:18:5 | LL | / fn const_generic_params<'a, T, const N: usize>(&self, b: &'a [T; N]) -> &'a [T; N] { LL | | b LL | | } | |_____^ error: this could be a `const fn` --> $DIR/could_be_const.rs:24:1 | LL | / fn one() -> i32 { LL | | 1 LL | | } | |_^ error: this could be a `const fn` --> $DIR/could_be_const.rs:29:1 | LL | / fn two() -> i32 { LL | | let abc = 2; LL | | abc LL | | } | |_^ error: this could be a `const fn` --> $DIR/could_be_const.rs:35:1 | LL | / fn string() -> String { LL | | String::new() LL | | } | |_^ error: this could be a `const fn` --> $DIR/could_be_const.rs:40:1 | LL | / unsafe fn four() -> i32 { LL | | 4 LL | | } | |_^ error: this could be a `const fn` --> $DIR/could_be_const.rs:45:1 | LL | / fn generic(t: T) -> T { LL | | t LL | | } | |_^ error: this could be a `const fn` --> $DIR/could_be_const.rs:68:9 | LL | / pub fn b(self, a: &A) -> B { LL | | B LL | | } | |_________^ error: this could be a `const fn` --> $DIR/could_be_const.rs:78:5 | LL | / fn const_fn_stabilized_before_msrv(byte: u8) { LL | | byte.is_ascii_digit(); LL | | } | |_____^ error: aborting due to 9 previous errors