]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/refs_check_const_eq-issue-88384.rs
Merge commit 'cb7915b00c235e9b5861564f3be78dba330980ee' into clippyup
[rust.git] / src / test / ui / consts / refs_check_const_eq-issue-88384.rs
1 // check-pass
2
3 #![feature(fn_traits)]
4 #![feature(adt_const_params)]
5 //~^ WARNING the feature `adt_const_params` is incomplete
6
7 #[derive(PartialEq, Eq)]
8 struct CompileTimeSettings{
9     hooks: &'static[fn()],
10 }
11
12 struct Foo<const T: CompileTimeSettings>;
13
14 impl<const T: CompileTimeSettings> Foo<T> {
15     fn call_hooks(){
16     }
17 }
18
19 fn main(){
20     const SETTINGS: CompileTimeSettings = CompileTimeSettings{
21         hooks: &[],
22     };
23
24     Foo::<SETTINGS>::call_hooks();
25 }