about summary refs log tree commit diff
path: root/tests/ui/traits/const-traits/fn-ptr-lub.rs
blob: 8f1a29e612c98e8abca4f37228dee31d788a8fea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
//@ compile-flags: -Znext-solver
//@ check-pass

#![feature(const_trait_impl)]

const fn foo() {}
const fn bar() {}
fn baz() {}

const fn caller(branch: bool) {
    let mut x = if branch {
      foo
    } else {
      bar
    };
    x = baz;
}

fn main() {}