blob: afa577fa67ff288f4ac3df0b17d1a587bad9ca0c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
// run-pass
#![feature(const_generics, const_compare_raw_pointers)]
//~^ WARN the feature `const_generics` is incomplete
fn function() -> u32 {
17
}
struct Wrapper<const F: fn() -> u32>;
impl<const F: fn() -> u32> Wrapper<F> {
fn call() -> u32 {
F()
}
}
fn main() {
assert_eq!(Wrapper::<function>::call(), 17);
}
|