about summary refs log tree commit diff
path: root/tests/ui/traits/const-traits/function-pointer-does-not-require-const.rs
blob: 8acd195e546b29efc42e5e3f676062b4724de643 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//@ check-pass
#![feature(const_trait_impl)]

#[const_trait]
pub trait Test {}

impl Test for () {}

pub const fn test<T: [const] Test>() {}

pub const fn min_by_i32() -> fn() {
    test::<()>
}

fn main() {}