error: this could be a `const fn` --> $DIR/could_be_const.rs:13: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:17: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:23:1 | LL | / fn one() -> i32 { LL | | 1 LL | | } | |_^ error: this could be a `const fn` --> $DIR/could_be_const.rs:28:1 | LL | / fn two() -> i32 { LL | | let abc = 2; LL | | abc LL | | } | |_^ error: this could be a `const fn` --> $DIR/could_be_const.rs:34:1 | LL | / fn string() -> String { LL | | String::new() LL | | } | |_^ error: this could be a `const fn` --> $DIR/could_be_const.rs:39:1 | LL | / unsafe fn four() -> i32 { LL | | 4 LL | | } | |_^ error: this could be a `const fn` --> $DIR/could_be_const.rs:44:1 | LL | / fn generic(t: T) -> T { LL | | t LL | | } | |_^ error: this could be a `const fn` --> $DIR/could_be_const.rs:52:1 | LL | / fn generic_arr(t: [T; 1]) -> T { LL | | t[0] LL | | } | |_^ error: this could be a `const fn` --> $DIR/could_be_const.rs:65:9 | LL | / pub fn b(self, a: &A) -> B { LL | | B LL | | } | |_________^ error: this could be a `const fn` --> $DIR/could_be_const.rs:75:5 | LL | / fn const_fn_stabilized_before_msrv(byte: u8) { LL | | byte.is_ascii_digit(); LL | | } | |_____^ error: this could be a `const fn` --> $DIR/could_be_const.rs:86:1 | LL | / fn msrv_1_46() -> i32 { LL | | #![clippy::msrv = "1.46"] LL | | LL | | 46 LL | | } | |_^ error: aborting due to 11 previous errors