blob: 66cf4e3152934a37121799f6e6eca29c39d6fda2 [file] [log] [blame]
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) -> T {
LL | | t
LL | | }
| |_^
error: this could be a `const fn`
--> $DIR/could_be_const.rs:53:1
|
LL | / fn generic_arr<T: Copy>(t: [T; 1]) -> T {
LL | | t[0]
LL | | }
| |_^
error: this could be a `const fn`
--> $DIR/could_be_const.rs:66: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 | | 46
LL | | }
| |_^
error: aborting due to 11 previous errors